Bash: Input from multiple files.
- April 25th, 2009
- Write comment
exec 3<$1 4<$2
while read file1 <&3 && read file2 <&4
do
code
done
Archive for April, 2009
exec 3<$1 4<$2
while read file1 <&3 && read file2 <&4
do
code
done
On the client you want to log from:
vi /etc/rsyslog.conf
…
*.* @RemoteSyslogIPAddress:Port
…
Example:
*.* @172.18.1.50:514
On the remote logging server:
vi /etc/rsyslog.conf
…
# Begin – Allow remote logging
$ModLoad imudp.so
$UDPServerRun 514
# End – Allow remote logging
…
Need to send a HUP to the rsyslogd process or
service rsyslog reload
Various useful lsof options:
To view files open by a particular PID:
lsof -p pidnumber
To show processes and the port they are running on. This is a great command to find out not only process and port, but also the command and the PID.:
lsof -i -nP # The -n does not resolve the IP addresses and ports to names.
Source: http://sial.org/howto/debug/unix/lsof/