- or download this
$ sudo mkfifo /var/log/blackhole.pipe
- or download this
$ cat /etc/syslog.conf
...
# test logger script
local1.* |/var/log/blackhole.pipe
- or download this
$ logger -p local1.info "test test"
$ logger -p local1.info "test test"
$ logger -p local1.info "test test"
$ logger -p local1.info "test test2"
- or download this
$ cat /var/log/blackhole.pipe
Oct 3 11:16:09 localhost plankton: test test
Oct 3 11:16:15 localhost last message repeated 2 times
Oct 3 11:16:19 localhost plankton: test test2
- or download this
$ cat process_blackhole.pl
#!/usr/bin/perl -w
...
# should never really come down here ...
close $fifo_fh;
exit(0);
- or download this
$ sudo ./process_blackhole.pl
read from pipe [Oct 3 11:22:45 localhost plankton: test test]
read from pipe [Oct 3 11:22:52 localhost plankton: test test2]