SUMMARY: vi editor

From: Karki, Prabhat <pkarki01_at_sprintspectrum.com>
Date: Tue Jul 31 2001 - 15:43:01 EDT
Thanks to all!!
I received a overwhelming number of responses. Presently I'm working to
implement LDAP in around 700 UNIX boxes of different flavors. I was having
problem populating my directory with the format of the hosts file i was
given and i needed to make the format change. Couple of day ago I posted a
LDAP question and I didnt get not even single response. So I thought maybe
there werent as many people using this list as they used to be.
But today when I got all the responses regarding my vi editor question, I'm
thrilled!!
Thanks all again! 
well the solutions was rather simple. I used awk

cat /etc/hosts | awk '{ print $2 "   " $1 }' > hosts.newfile

-----Original Message-----
From: Karki, Prabhat [mailto:pkarki01@sprintspectrum.com]
Sent: Tuesday, July 31, 2001 1:38 PM
To: sunmanagers@sunmanagers.org
Subject: vi editor


Hello all,
I have a /etc/hosts file where there are two columns. One of hostname and
one of IP addresses. 
eg:

hostA		x.x.x.x
hostb		x.x.x.x
hostc		x.x.x.x
.
.
.
hostz		x.x.x.x

I need to switch the column so that the first column becomes that of IP
address and the second that of hostname. There are around 1000 entries so
doing one at a time is ridiculous. 
Is there a vi editor command to switch the columns??
Any tip would be great.

TIA
Prabhat Karki.
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers
Received on Tue Jul 31 20:43:01 2001

This archive was generated by hypermail 2.1.8 : Wed Mar 23 2016 - 16:25:00 EDT