#!/bin/sh # replace spaces in filenames with - for f in *\ *; do mv "$f" "${f// /-}"; done