brianspilner01 / media-server-scripts

84 stars 18 forks source link

Syntax error: newline unexpected #1

Closed CarlosHartmann closed 3 years ago

CarlosHartmann commented 3 years ago

I downloaded the file and gave it exec rights. When trying to execute it over the media library using find . -name '*.srt' -exec /path/to/sub-clean.sh "{}" \; I get this error:

Syntax error: newline unexpected

Would be grateful if you could look into it, thanks!

brianspilner01 commented 3 years ago

I had a bit of a play with this and did notice my fix for sed to get it to work for Mac had actually broken it on Linux, but wasn't actually getting the same error that you got when running the same command. Feel free to try it now with the updated line in that last commit and see if it fixes it for you, otherwise share some information on what system you are running and I'll try to look a little further.

CarlosHartmann commented 3 years ago

I'm on Linux (Armbian) and your last change fixed it for me. Cheers!