You are not logged in.
hello everyone
i have a text file with email addresses separated by comas
i would like to have each address on a single line
so i would like to replace the coma with a newline
how do i do this ?
please suggest either a perl or python or batch script or whatever that works quick and dirty
thx
Offline
sed 's/,/\n/g' -i text_file
But, really use google next time....
Offline
cat FILE | tr ',' '\n'
Offline
sed 's/,/\n/g' -i text_file
But, really use google next time....
It's often sensible to output to a new file the first time a sed script is run, just in case of unexpected results.
If using -i you can also supply a suufix (eg bak) and it will back the file up first.
Also note, not all versions of sed support -i (though on most Linux distros you should be fine).
"...one cannot be angry when one looks at a penguin." - John Ruskin
"Life in general is a bit shit, and so too is the internet. And that's all there is." - scepticisle
Offline
beautiful
thanks
Offline