Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Easy UNIX notation question

Status
Not open for further replies.

lavaghman

Programmer
Apr 3, 2002
57
AU
can anyone tell me what exactly the following UNIX notation code does cause I need to do the same in windows?

for x in webapps/sal/*.htm*
do
mv $x $x.bak
sed 's@bob@sal@g' $x.bak > $x
done



Thanks
 
This finds any htm files in the /webapps/sal directory and moves the x.htm file to x.bak, then sed parses the x.bak file for the name bob and replaces it with sal recursely. The file is then moved back to x.htm or the same as it was before. These files are processed one at a time.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top