[ale] Shell Scripting question

Geoffrey esoteric at 3times25.net
Wed Aug 6 15:36:33 EDT 2003


nick travis wrote:
> thanks for the help, what can I use to get the last three words off of a
> line, instead of just the last word?

As long as it's delimited by white space:

awk '{print $(NF-2), $(NF-1), $NF}'  inputfile

You can format it real pretty as well, 'man awk' and search fro printf.


-- 
Until later: Geoffrey		esoteric at 3times25.net

The latest, most widespread virus?  Microsoft end user agreement.
Think about it...

_______________________________________________
Ale mailing list
Ale at ale.org
http://www.ale.org/mailman/listinfo/ale





More information about the Ale mailing list