I`m new to bash scripting and need some help with a strange problem.
Here is my lines of code:
#!/bin/ash -x
echo Variabel \$1='\t'$1
TARGET_DIR=/volume1/video/Transcoded/
echo "Variabel\$TARGET_DIR=$TARGET_DIR"
fbname=$(basename "$1")
echo Variabel \$fbname=$fbname
out="${fbname}""${TARGET_DIR}"
echo $out
read -p "Press [Enter] key to start next Transcode..."
This outputs:
Variabel $1=\t/volume1/video/Movies/Thor (2011)/Thor (2011).mkv
Variabel$TARGET_DIR=/volume1/video/Transcoded/
Variabel $fbname=Thor (2011).mkv
/volume1/video/Transcoded/
Press [Enter] key to start next Transcode...
in the the last echo $out shoulde be path and file name combined.. but it is broken. what could be wrong?
Thanks for any anwer:)