New on LowEndTalk? Please Register and read our Community Rules.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
Bash script problem
I want to encode all files in a folder from mkv to mp4. I got a bash script:
in the folder,the filename is like this :
[A-Destiny] Toriko - 51 (848x480 h264 AAC) [B7B209E9].mkv
when I execute the script, it show errors..
what can I see, when it scan the folder, the filename will be separated.example:
[A-Destiny] Toriko - 51 (848x480 h264 AAC) [B7B209E9].mkv
wll be:
[A-Destiny]
Toriko
51
848x480
h264
AAC
[B7B209E9]
the problem is, why dont it detect the filename as "[A-Destiny] Toriko - 51 (848x480 h264 AAC) [B7B209E9]"
Comments
You need to setup your $IFS variable.
Here's an example:
thanks
hey @black, I found another solution.. just add couple quotes
btw, I got another problem..
it is successfully by doing echo..
but, when I use it in HandBrakeCLI command, it show:
That's probably your $HANDBRAKE_CLI or improperly passing arguments to the program.
for f in *.mkv; do avconv -i "$f" -codec copy "$f".mp4; done
I tried put "" at $DEST.. suddenly the error gone
thanks all
What about mkv->avi
https://libav.org/avconv.html