sed question: remove decoration from each line
Hi, how can I with sed take a text file and remove everything after (and including) the @-sign if it can be found?
Say I have this file: line one line two@3 line three@332 I want it to look like. line one line two line three |
miguel@gold:~> cat /tmp/z | sed -e 's/@.*//'
line one line two line three miguel@gold:~> cat /tmp/z | cut -d@ -f 1 line one line two line three miguel@gold:~> cat /tmp/z | awk -F@ '{print $1}' line one line two line three miguel@gold:~> I think the cut version is more efficient than others.... |
All times are GMT -5. The time now is 05:28 PM. |