1 2 3 4 5 6
#!/bin/sh # replace spaces in filenames with - for f in *\ *; do mv "$f" "${f// /-}"; done