Quote:
Originally Posted by grail
Actually, as the data ends with the separator the above will not work as the last entry is the empty data after the last separator.
Maybe try:
Code:
awk '/[^[:space:]]/{out = $0}END{print out}' RS="##########" file
This will save the last entry that contains something other than just white space
|
Actually, the command I provided works if the '##########' is the absolute last thing in the file. If anything follows the '##########', even a newline, then you get that which may be blank.
So, yours is definitely more robust. Good one, thx for speaking up.