I'm working out of very old memory here and I just can't see what's wrong with the following little snippet of a script. I isolated the problem to this part >>
#!/bin/sh
for x in `ls ~/sandbox/inputVids/*.mp4`
do
echo $x;
cp "$x" "~/sandbox/outputVids/${x/%.mp4/.silent.mp1}";
done
I keep getting the message
./makeRepeater.sh: 15: ./makeRepeater.sh: Bad substitution
any help appreciated, thanks.
Few glitches in your script:
ls
's output~
is not expanded inside the double quotessh
instead ofbash
Use this script instead: