background: I have my main box running as a headless server while we are staying with family for the summer, which I SSH to if I need to use RDP or do anything other than use MPD, Samba, DLNA, or Deluged.
issue: I'm experiencing some odd behaviour with a shell script, which I'm using to convrrt some videos with ffmpeg. it runs fine if I don't specify a framerate or flags in advance. the issue is, that the '-z' test is reporting the variable empty even though it isn't, as seen here:
here's the script:
# new file name
if [ -z "$rate" ]; then
if [ -z "$flags" ]; then
if [ ! -d "converted" ]; then
if [ ! -f "$F" ]; then
ffmpeg -i "$1" -r "$rate" -acodec libvo_aacenc -b 128k -vcodec mpeg4 -b 1200k -flags "$flags" "$F"