我正在使用非常古老的内存,我只是无法看到脚本的以下小片段出了什么问题。我孤立的问题,这部分>>用简单的bash脚本生锈
#!/bin/sh
for x in `ls ~/sandbox/inputVids/*.mp4`
do
echo $x;
cp "$x" "~/sandbox/outputVids/${x/%.mp4/.silent.mp1}";
done
我不断收到消息
./makeRepeater.sh:15:./makeRepeater.sh:坏替代
任何帮助表示感谢。
哪一行是15行?代码发布看起来很好。也许,你没有使用bash和其他shell,或者在顶部有错误的shebang?第一行是否有'#!/ bin/bash'? –
有问题的行是前一行。是的,该文件以#!/ bin/sh – Slabo
ubuntu @ ip-17开头:〜/ sandbox $ ls -l/bin/sh lrwxrwxrwx 1 root root 4 Feb 19 2014/bin/sh - >破折号 – Slabo