Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 19 Nov 2002 16:13:45 -0600 (CST)
From:      Scott Pilz <tech@tznet.com>
To:        paul beard <paulbeard@mac.com>
Cc:        questions <questions@freebsd.org>
Subject:   Re: Syslog Piping
Message-ID:  <20021119161316.U50599-100000@mail.tznet.com>
In-Reply-To: <3DDAB64B.8050201@mac.com>

next in thread | previous in thread | raw e-mail | index | archive | help

	Tried that - but found the problem.

	Picky picky picky :)... needed a "./pipe.pl".. I should have known
better. Guess I got used to /bins.

Thanks.

On Tue, 19 Nov 2002, paul beard wrote:

> Scott Pilz wrote:
>
> > 	In syslog, if you have:
> >
> > *.*			| /pipe.pl
> >
> > The output should be piped to pipe.pl - how, in perl, would you
> > go about
> > capturing this output? I have tried everything I could think of. $1,
> > ARGV[#], STDIN, while (<>)
>
>
> while (<>) {
> code
> }
>
> should work. It's not a linuxism.
>
> here's a sample:
>
> [/home/paul]:: more test.pl
> #!/usr/bin/env perl
> while (<>) {
>          print $_;
>          }
>
> Now just pipe something thru it:
>
> [/home/paul]:: cat .signature | test.pl
> Paul Beard / 8040 27th Ave NE / Seattle WA 98115 /
> paulbeard [at] mac [ dot] com / 206 529 8400
>
> weblog @ <http://paulbeard.no-ip.org/movabletype/>;
>
> I'm rated PG-34!!
>
> --
> Paul Beard / 8040 27th Ave NE / Seattle WA 98115 /
> paulbeard [at] mac [ dot] com / 206 529 8400
>
> weblog @ <http://paulbeard.no-ip.org/movabletype/>;
>
> I'm rated PG-34!!
>


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021119161316.U50599-100000>