[PLUG] File content modification

Mehul Ved mehul.n.ved at gmail.com
Wed Aug 4 03:21:16 PDT 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