Rick, assuming these are not image files (i.e., do not
contain binary data) and also assuming that you are
running bash, you could write a simple shell script
like:

TMPFILE=/tmp/tmp.$RANDOM
for file in *.xpm; do
  echo "$file"
  sed -e "s/static/const/g" $file >
$TMPFILE
  cat $TMPFILE > $file;  # retains permissions,
etc.
done
rm $TMPFILE

HTH,
Brad.
--- "Richard R. Sivernell"
<[EMAIL PROTECTED]> wrote:
> List
> 
>   This may be stupid simple, that is why I am
here,
> my question is this:
> I have some files *.xpm that have a word static
in
> them. I want to change 
> the word to const. What is the easy way to to
have a
> script to open each file
> in a directory & change the word, save and
close the
> file.
> 
> Any help appreciated  Cheers
> 
> -- 
> Rick Sivernell
> Dallas, Texas  75287
> 972 306-2296
> [EMAIL PROTECTED]
> Caldera Open Linux eWorkStation 3.1.1
> Registered Linux User
> 
>    .~.
>   / v \r
>  /( _ )\r
>    ^ ^
> In Linux we trust!


__________________________________________________
Do you Yahoo!?
Yahoo! News - Today's headlines
http://news.yahoo.com
_______________________________________________
Linux-users mailing list
[EMAIL PROTECTED]
Unsubscribe/Suspend/Etc -> http://www.linux-sxs.org/mailman/listinfo/linux-users

Reply via email to