[CentOS] sed

Fri May 23 18:28:24 UTC 2008
MHR <mhullrich at gmail.com>

On Fri, May 23, 2008 at 8:50 AM, Matt Shields <mattboston at gmail.com> wrote:
>
> I'd use awk.  Put the lines in a file, then do this
>
> cat test.txt | awk '{ print $1 "\t" $2 ".centos.com\t" $3 "\t" $4 }'
>

Or just awk '{ print $1 "\t" $2 ".centos.com\t" $3 "\t" $4 }' test.txt
> newhostsfile

(The cat just complicates things, as with most cats.... :-)

mhr