#!/bin/bash for i in *.mp3; do mv "$i" "`echo $i|tr '\ ' '_'`";done