#!/bin/sh
for f in `ls *.png`
do
convert $f -fill gray(50%) -opaque black ./background_change/$f
done
for f in `ls *.PNG`
do
convert $f -fill gray(50%) -opaque black ./background_change/$f
done
对于上面提到的 shell 脚本,我收到一条错误消息:
[gsamanth@cngfile Acsady]$ sh background_change.sh
'ackground_change.sh: line 3: syntax error near unexpected token `do
'ackground_change.sh: line 3: `do
[gsamanth@cngfile Acsady]$
为什么呢?