[PLUG] File content modification

Mehul Ved mehul.n.ved at gmail.com
Wed Aug 4 15:51:16 IST 2010


On Sun, Aug 1, 2010 at 2:34 PM, Mehul Ved <mehul.n.ved at gmail.com> wrote:
> Try
>
> sed -e 's/_/ /g' inputfile | sed -e 's/^ *[^ ]* //' | sed -e 's/^\(.*\)
> .*/\1/' | sed -e 's/ //g' > outputfile
>
> Not sure if there's a way to do it without piping it so many times.

A little simpler
sed -e 's/_/ /g' -e 's/^ *[^ ]* //' -e 's/^\(.*\) .*/\1/' -e 's/ //g'
inputfile > outputfile




More information about the Plug-mail mailing list