For example i have a file:
$ cat file i am the first example. i am the second line. i do a question about a file.
and i need:
You can do something like this in awk:
awk '{ print $NF }'
Edit: To avoid empty line :
awk 'NF{ print $NF }'