Forum Moderators: bakedjake
Something like (as a test)
echo "From: someone <email@email.com>" ¦ sed something or other
I need to get the <email@email.com> part, if there is any whitespace after the last word, I need to delete that too
Thanks for any help
Robbo
echo "hello my name is bob " ¦ awk '{print $NF}' That will return the last word no matter how many whitesaces after it. :)
From the
man awk page: $NF is: NF number of fields in the current record From that, I believe it's actually printing the value that's in $NF (the number of fields, so the last field).
HTH!
MM