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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

First Lilne

Status
Not open for further replies.

ubstek

Programmer
Joined
Feb 2, 2001
Messages
9
Location
US
Hello,

I have a bunch of scripts in a dir, and I need to add string $Id$ in the first line of all these scripts.

I want to automate this process.

Thank you very much in advance.
 
How about:
for i in `ls`
do
echo "$Id$" > /tmp/newfile
cat $i >> /tmp/newfile
mv /tmp/newfile $i
done
 
PERFECT !!

Thank you.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top