cat logfile.txt | sed 's/+0100/-0500/g' > anotherfile.txt
The above command will parse logfile.txt, change things as you wish with
the sed command (I believe this will work), and send the output to
anotherfile.txt. The 's' at the beginning starts the s statement and the
'g' at the end tells sed not to ignore the rest of the line after it finds
a match (so it does the whole line).
Um.. I'm sure about 10 others will help you with this too :)
On Fri, 26 Jan 2001, 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
>
>
>
> _______________________________________________
> Redhat-list mailing list
> [EMAIL PROTECTED]
> https://listman.redhat.com/mailman/listinfo/redhat-list
>
--
-Statux
_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list