RE: swapping three columns in a file..
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\>jj^V/\/\/EOF\>kkf dA ^Cp 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
swapping three columns in a file..
Hi All, How to swap the three columns in file without using substitute command? Let us say file with the following contents, //BOF A1 B1 C1 A2 B2 C2 //EOF. Then after swapping the file content should be, //BOF C1 A1 B1 C2 A2 B2 //EOF 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 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
RE: problem in opening a file name start with "+" in vi editor..
Antonio, It is very cool. I tried with absolute path. It is working fine.. Thanks a lot... 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: Antonio Colombo [mailto:[EMAIL PROTECTED] Sent: Saturday, December 16, 2006 1:19 PM To: Sasikumar Kandhasamy (WT01 - TELECOM SERVICE PROVIDER) Subject: RE: problem in opening a file name start with "+" in vi editor.. Sasikumar, depending on your environment, you can try with an absolute path, or a relative path, like: ./+whatever or .\\+whatever Hope it helps. Cheers from Italy, Antonio -- /||\| Antonio Colombo / || \ | [EMAIL PROTECTED] / () \ | [EMAIL PROTECTED] (___||___) | [EMAIL PROTECTED] 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
problem in opening a file name start with "+" in vi editor..
Hi All, I couldn't open the file name start with "+" in vi editor. Since "+" is the option in vi editor. Is there any other way to open the file? Note: I tried with escape character "\" also. Thanks in advance. 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 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