On Fri, Jan 26, 2001 at 07:49:02PM -0500, Mark Basil wrote:
> I was wondering if someone might be able to help me out with a
> situation.  I need a script that will run every night that will
> process some logs.  It needs to find all instances of "+0100", and
> replace it with "-0500".  I'm not all that experienced with shell
> scripts, although I'm trying to find some time to get good at it.  I
> just can't wait until then to get this accomplished.  Any help would
> be greatly appreciated.  --Mark

Untestd, but should be close:

logs="log1 log2 log3 etc"

for i in logs; do

 cat $i |sed 's/+0100/-0500/' > $i.tmp
 mv -f $i.tmp $i

done

-- 
Hal B
 [EMAIL PROTECTED]
 [EMAIL PROTECTED]
 [EMAIL PROTECTED]
--



_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list

Reply via email to