22 Mar
2001
22 Mar
'01
12:15
Today, Stefan Troeger smoke something and in the trip wrote...
Hi,
On Thu, Mar 22 2001 at 06:48 -0500, dizzy73 wrote:
Im trying to figgure out how to grep a file and only produce the *last* line found. I want to cat /var/log/messages | grep remote this outouts all line which contain remote, I only want the last one I plant to display onscreen my remote ip when I connect to my isp.
Try `grep remote /var/log/messages | tail -1'.
maybe use /etc/ppp/ip-up to print its argument is less resource-intensive than searching through /var/log/messages :) obviously, only if you connect via ppp :) but maybe ifconfig "you_net_interface" | grep | sed do the trick :) Regards, Adilson