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

Popular posts from this blog

javascript - Chart.js (Radar Chart) different scaleLineColor for each scaleLine -

jquery - ReferenceError: CKEDITOR is not defined -

android - Go back to previous fragment -