The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #7 (permalink)  
Old 06-23-2007
blowtorch's Avatar
blowtorch blowtorch is offline Forum Advisor  
Supporter
  
 

Join Date: Dec 2004
Location: Singapore
Posts: 2,350
Thumbs up

Adapting aigles' code
Code:
for file in $(find /path/to/dir -type f); do
   tr -d '\r' <$file >temp.$$ && mv temp.$$ $file
done

Last edited by blowtorch; 06-23-2007 at 02:10 AM.. Reason: fix broken code tags