diff --git a/other/get_wavfile_props.sh b/other/get_wavfile_props.sh index 6e92d5b1dc9d3c4e631179ab841a4560288fcf61..2402869fe43e693bf4e38606ee1f515ff49acecb 100755 --- a/other/get_wavfile_props.sh +++ b/other/get_wavfile_props.sh @@ -56,18 +56,18 @@ then exit fi -filename=`basename $file` +filename=`basename "$file"` if [ "$md5" = "md5sum" ]; then - md5sum=`$md5 -b $file | cut -d" " -f1` + md5sum=`$md5 -b "$file" | cut -d" " -f1` elif [ "$md5" = "md5" ]; then - md5sum=`$md5 -r $file | cut -d" " -f1` + md5sum=`$md5 -r "$file" | cut -d" " -f1` else echo "No valid executable for calculating md5. Aborting." exit fi # getting all info from InfoAudio - storing in res -res=`$InfoAudio $file` +res=`$InfoAudio "$file"` # paring res sampleFreq=`echo "$res" | grep -m1 "Sampling frequency" | sed -e 's/\([a-zA-Z\. ]*: \)\([0-9]*\)\(.*\)/\2/g'` @@ -82,7 +82,7 @@ fi numberChannels=`echo "$res" | grep -m1 "No. channels" | sed -e 's/\([a-zA-Z\. ]*: \)\([0-9]*\)\(.*\)/\2/g'` -dataType=`echo "$res" | grep -m1 "Data type" | sed -e 's/\([a-zA-Z\. ]*: \)\([[a-zA-Z0-9]*\)\(.*\)/\2/g'` +dataType=`echo "$res" | grep -m1 "Data type" | sed -e 's/\([a-zA-Z\. ]*: \)\([[a-zA-Z0-9\-]*\)\(.*\)/\2/g'` dataByteOrder=`echo "$res" | grep -m1 "Data byte order" | sed -e 's/\([a-zA-Z\. ]*: \)\([[a-zA-Z0-9-]*\)\(.*\)/\2/g'` diff --git a/other/pad_file_20ms.sh b/other/pad_file_20ms.sh index 92be20ae55c8911e1a021b384662f435b3830988..e305a6e55c541df124c4aa2c143587a0ca89f79e 100755 --- a/other/pad_file_20ms.sh +++ b/other/pad_file_20ms.sh @@ -45,7 +45,7 @@ InfoAudio=InfoAudio CopyAudio=CopyAudio # getting all info from InfoAudio - storing in res -res=`$InfoAudio $file_in` +res=`$InfoAudio "$file_in"` # paring res sampleFreq=`echo "$res" | grep -m1 "Sampling frequency" | sed -e 's/\([a-zA-Z\. ]*: \)\([0-9]*\)\(.*\)/\2/g'` @@ -57,17 +57,17 @@ samplesToPad=0 if [ $remainder -eq 0 ]; then # no padding required, just copy files - cp $file_in $file_out + cp "$file_in" "$file_out" else samplesToPad=$(expr 960 - $remainder) limit=$(expr $samplesToPad - 1) # copy required number of sampled to pad into temp file, scale with 0 gain --> results in silence tmp=`mktemp` - $CopyAudio -l 0:$limit -g 0 $file_in $tmp + $CopyAudio -l 0:$limit -g 0 "$file_in" $tmp # concatenate original file with silence block - $CopyAudio --concatenate $file_in $tmp $file_out + $CopyAudio --concatenate "$file_in" $tmp "$file_out" # delete tmp file rm -f $tmp