View Single Post
Old 11-01-2005, 10:48 AM   #1 (permalink)
susanh
Junior Member
 
Join Date: Jun 2005
Posts: 29
Default Renaming multiple files - shell script

Hi -
I have a folder with a few dozen files that start with ._ but are mp3's and I do not want them to be hidden. What would I have to do to remove the first character of each file name matching this ._ prefix?

I have tried this but it fails with filenames with spaces:
Code:
#!/bin/sh for i in `ls -a` do mv $i `echo $i | sed "s/\._//"` done

thanks in advance...
susanh is offline   Reply With Quote
Sponsored Links