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 -

apache - Error with PHP mail(): Multiple or malformed newlines found in additional_header -

java - Android – MapFragment overlay button shadow, just like MyLocation button -