The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #6 (permalink)  
Old 12-21-2005
zazzybob's Avatar
zazzybob zazzybob is offline Forum Advisor  
Registered Geek
  
 

Join Date: Dec 2003
Location: Melbourne, Australia
Posts: 2,100
My above post was an interactive session, hence the "touch"es.

If you don't want to keep the changes, you can easily do (as long as there aren't a load of files....)

Code:
ls *mlcl* | sed 's/mlcl/mll/g'

Else; just do

Code:
ls | while read file; do
  echo "${file}" | sed 's/mlcl/mll/'
done

If you want to keep the filename change, just add in the mv.

Cheers
ZB