| 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

Try:

        bsed 's/+0100/-0500/g' the-log-files...

You can get bsed here:

        http://www.zip.com.au/~cs/scripts/bsed

It's essentially a wrapper for sed which tries hard to be careful, and
preserves permissions and hardlinks (which the "sed file >foo; mv foo
file" approaches don't, because they destroy the original and replace
it).

I find it _very_ handy.
-- 
Cameron Simpson, DoD#743        [EMAIL PROTECTED]    http://www.zip.com.au/~cs/

...technology marches on - and makes 150-mph motorcycles for 15-mph
beginners' brains.      - _motorcyclist_



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

Reply via email to