threadhead
12-26-2002, 01:50 PM
hello there.
i wrote a shellscript to view and log all my TCP
connections.
heres the code:
#!/bin/sh
tail -f /var/log/syslog | grep "PROTO=TCP" > /root/connections.log
tail -f monitors all things being actually written to the file specified. with grep i filter out the desired lines.
with > /root/connections.log i want to keep a clear
log file with all the TCP connections.
when i run the script, i can see the filtered output.
even the file /root/connections.log creates itself.
BUT nothing is written to file!
whats wrong with that?
thanks threadhead
i wrote a shellscript to view and log all my TCP
connections.
heres the code:
#!/bin/sh
tail -f /var/log/syslog | grep "PROTO=TCP" > /root/connections.log
tail -f monitors all things being actually written to the file specified. with grep i filter out the desired lines.
with > /root/connections.log i want to keep a clear
log file with all the TCP connections.
when i run the script, i can see the filtered output.
even the file /root/connections.log creates itself.
BUT nothing is written to file!
whats wrong with that?
thanks threadhead