Re: sed

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



On Fri, May 23, 2008 at 8:50 AM, Matt Shields <mattboston@xxxxxxxxx> 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
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos

[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux