Hope following command is quite easy to manipulate,

Mark the first line as "mt", then use awk to swap the columns

't,. !awk '{print $3 " " $2 " " $1}'

Thanks & Regards,
Sasikumar Kandhasamy
Project Engineer    
Wipro Technologies
Madivala-1|Bangalore.
 
Mobile- +91-9986378586 | Phone: 30292842
 
"Dreams into Thoughts and Thoughts into Actions" -- Dr. A P J Abdul
Kalam

-----Original Message-----
From: Milan Vancura [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, December 19, 2006 1:55 PM
To: Sasikumar Kandhasamy (WT01 - TELECOM SERVICE PROVIDER)
Cc: Vim development list
Subject: Re: swapping three columns in a file..

>       How to swap the three columns in file without using substitute
> command? 

Hi,
 I don't understand why you can't use :s so I don't know if the
following
solution would be usable for you. 

defining:

qq/\/\/BOF\><Enter>jj^V/\/\/EOF\><Enter>kkf dA ^Cp

<Enter> means Enter key
^V and ^C mean ctrl-V and ctrl-C

using:

@q

> The information contained in this electronic message and any
attachments to
> this message are intended for the exclusive use of the addressee(s)
and may
> contain proprietary, confidential or privileged information. If you
are not
> the intended recipient, you should not disseminate, distribute or copy
this
> e-mail. Please notify the sender immediately and destroy all copies of
this
> message and any attachments. 

> WARNING: Computer viruses can be transmitted via email. The recipient
should
> check this email and any attachments for the presence of viruses. The
company
> accepts no liability for any damage caused by any virus transmitted by
this
> email.

Please use an e-mail account administered by someone inteligent, who
doesn't
put these (or similar) stupid and arrogant automatic footers. You are
posting
an e-mail to the list and there are clear rules of that list. One well
known
property of it is HTML mirroring readable by anybody on the world. If
you don't
agree with this, don't send any "electronic message" to it.

The same about viruses. Instead of sending them with a warning that it
is a
recipient's problem to get a virus (which is really very arrogant
"warning"!!)
don't send viruses at all :-)

I hope this is your misunderstanding, you probably use an employer's
e-mail
server instead of getting your own personal e-mail account for personal
e-mails. Please change it.

Milan Vancura
--
Milan Vancura, Prague, Czech Republic, Europe


The information contained in this electronic message and any attachments to 
this message are intended for the exclusive use of the addressee(s) and may 
contain proprietary, confidential or privileged information. If you are not the 
intended recipient, you should not disseminate, distribute or copy this e-mail. 
Please notify the sender immediately and destroy all copies of this message and 
any attachments. 

WARNING: Computer viruses can be transmitted via email. The recipient should 
check this email and any attachments for the presence of viruses. The company 
accepts no liability for any damage caused by any virus transmitted by this 
email.
 
www.wipro.com

Reply via email to