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 UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #3 (permalink)  
Old 03-25-2007
dennis.jacob dennis.jacob is offline
dj -------
 

Join Date: Feb 2007
Location: Cochin/Bangalore, India
Posts: 380
Try this out.......

Code:
for each in $(echo $1 | tr  ','  ' ' )
do
 sed 's/'$each'/g'  $2 >temp
 mv temp $2
done
cp $2 $3

Last edited by dennis.jacob; 03-26-2007 at 01:09 AM.
Reply With Quote