[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

tail and grep



when I try tail -f /var/log/messages | grep "local  IP"

it prints (with a real IP address instead of 123.123.123.123)

Jul  7 20:06:00 server2 pppd[587]: local  IP address 123.123.123.123

on my console.  That's exactly what it should do.  But if I try to
redirect it to a user's file (so he can see what his dynamic IP is) using

tail -f /var/log/messages | grep "local  IP" > /home/pppusers/dynamic.IP

it does nothing but create a 0 byte file.

Questions:

1. What am I doing wrong?

2. Is there a way I can put this in the background so I don't have to
remain logged in as root?

Thanks in advance.


--  
Unsubscribe?  mail -s unsubscribe debian-user-request@lists.debian.org < /dev/null


Reply to: