[bash] Get latest word from string

By.

min read

My profile

Share this:

[code:1:07c29cd7b0]echo $string | rev | cut -d” ” -f1 | rev[/code:1:07c29cd7b0]

Adapted from
http://unix.stackexchange.com/questions/174037/extracting-the-second-word-from-a-string-variable

Share this:

Leave a Reply

Your email address will not be published. Required fields are marked *