[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Sed advice needed

Piers Kittel (debian@biased.org) wrote on Thu, 31 May 2007 17:05:04 +0100:

>What's the best way to do this?  I've been reading the man pages of  
>sed, cut and awk but I can't quite figure out how to do this.  Any  

The sed man page is not very helpful I'm afraid. A pretty good manual is
here: <http://www.grymoire.com/Unix/Sed.html>.

Since you want to mask out various parts of your line you have to apply
sed to it various times, like this:

echo "your line" | sed (mask 1) | sed (mask 2) | sed (mask 3)

or, if your text comes from a file:

sed (mask 1) < yourFile | sed (mask 2) | sed (mask 3)

Hope this helps.

    G. Heinrich

Reply to: