Re: Cut command behaviour - bug or feature

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



Le mer. 29 août 2012 01:44:48 CEST, Rajagopal Swaminathan a écrit:

> Greetings,
> 
> On Wed, Aug 29, 2012 at 1:36 AM,  <m.roth@xxxxxxxxx> wrote:
> >
> > I've never been that good with cut. I'm going to see the author, Dave
> > Ihnat this weekend, who sometimes shows up here... but in the meantime,
> > you might use
> > awk 'BEGIN {FS=",";}{print $2 "," $3 "," $1;}' infile
> >
> 
> I tried it on an xp box with GnuWin32 binaries. It barked some error
> showing the single quote.
> 
> I will try on a centos box later (<grin>which I am silently injecting
> [installing] into that env after handwaving the xp</grin>).

You can also try with bash :
while IFS="," read A B C ; do echo "$B,$C,$A" ; done < infile

Regards,

-- 
Philippe Naudin
_______________________________________________
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