osx - Bad substitution on raspi does not occur on mac -
i'm trying write script replaces spaces underscores in every file in given directory. have shell script works on mac, when move pi throws error: remove-spaces.sh: 3: remove-spaces.sh: bad substitution. i'm wondering how can rid of error , causing it. script below.
for f in $1/*.*; mv "$f" "${f// /_}"; done
Comments
Post a Comment