Put Message text

nate100

Member
I have about 200 .p files if not more.
I need to be able to automatically look through each file and at the top of teh file, put message "<name of the file>".

THanks
 
Something like this ought to work:

Code:
#!/bin/sh
#

for FILE
do
    echo "message '${FILE}'." ; cat ${FILE} > /tmp/${FILE}.xyzzy
    mv /tmp/${FILE}.xyzzy ${FILE}
done
 
Back
Top