Hi,
If the names and addresses in your text file are separated by one or more tabs, you can try this on the *nix command line:
cat <text-file-name> | expand | tr -s " " | cut -d ' ' -f1 > <another-text-file-name>
If the names and addresses in your text file are separated by one or more spaces, you can even try this:
cat <text-file-name> | tr -s " " | cut -d ' ' -f1 > <another-text-file-name>
The first option will work in every case.
-Parul Mathur
-----Original Message-----
From: "Dr. Sharukh K. R. Pavri." <spavri(a)vsnl.com>
Subject: [ILUG-BOM] regexp query
Date: Wed, 10 Dec 2003 18:00:26 +0530
I have a text file in the format
Full name email@ddress
It's a pretty long list of names and I want to remove all the email
addresses from the file. I basically want to be left with a file with
only the names of the persons, one on each line.
I tried :s [a-z]\@[a-z] //g in vim but it did not work. It says
E59: invalid charcter after \@
how can I do this ?
thanks,
Sharukh.
--
Dr. Sharukh K. R. Pavri.
Mumbai, India.