Another SED question
I'm wanting SED to return the third word from a line of text and delete everything else. Can this be done?
|
I think awk would be prettier in this case.
Code:
sed 's/\([[:alpha:]]*\) \([[:alpha:]]*\) \([[:alpha:]]*\) .*/\3/' file.txt Code:
awk '{print$3}' file.txt |
Didn't want to bother making *another* sed thread, so...
How do I go about exracting a section of text I basically want: sed 's/^.*(BEGIN.*END).*$/\1/' Is there a shorter way to write this? |
All times are GMT -5. The time now is 03:04 AM. |