Dividing a line into two colums
Hi Guys
Consider i have a file with similar type of values e.g talat@hotmail.comagsggss talat@gmail.comhjhdhjdk i want to separate the email id and value after that in to two column so that when i open this file in excel it automatically goes in separate columns .I have tried adding space after email id but no luck.Any clue ? Regard Talat |
Comma separated values to the rescue: http://en.wikipedia.org/wiki/Comma-separated_values
|
cat old.txt | sed 's?^\([^@ ]*@[^\. @]*\.[^\. @]*\)\(.*\)$?\1,\2?' > out.txt
I'll be amazed if it works, that's off the cuff regex. |
All times are GMT -5. The time now is 12:29 AM. |