[sf-lug] I need a quick piece of code..
rick at linuxmafia.com
Wed Dec 30 22:57:07 PST 2009
Quoting John F. Strazzarino (jstrazza at yahoo.com):
> I have a three line text file
> This is a test
> blank line
> The last line of the file is a number and I need just that number....
tail -n 1 [filename]
If there's a blank line at the end of the file, though, you'll end up
Returning the last _non-blank_ line might be a little more difficult. ;->
More information about the sf-lug