[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ale] need a simple script
- Subject: [ale] need a simple script
- From: byron at cc.gatech.edu (Byron A Jeff)
- Date: Wed, 23 Jan 2002 08:57:55 -0500 (EST)
>
> Morning scripting gurus,
>
> need a script that takes in a file which is list of files and does a global
> string replace
> in each file.
---
#!/bin/bash
#
# Lightly tested shell script. No error checking
# Usage: sub <file> <from> <to>
while read file ; do
sed -e "s/$2/$3/g" < $file > /tmp/$$
mv /tmp/$$ $file
done < $1
--
My bill's in the mail ;-)
BAJ
---
This message has been sent through the ALE general discussion list.
See http://www.ale.org/mailing-lists.shtml for more info. Problems should be
sent to listmaster at ale dot org.