Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 12 Sep 2006 12:01:58 +0100
From:      Alex Zbyslaw <xfb52@dial.pipex.com>
To:        bsd <bsd@todoo.biz>
Cc:        Liste FreeBSD <freebsd-questions@freebsd.org>
Subject:   Re: Ambiguous output redirect
Message-ID:  <450693A6.7090108@dial.pipex.com>
In-Reply-To: <377AA521-83A6-45A6-9892-A1B167607EFD@todoo.biz>
References:  <377AA521-83A6-45A6-9892-A1B167607EFD@todoo.biz>

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

> I don't understand why when I execute this script I have an  
> "Ambiguous output redirect." ?
>
>
> p0f -l 'tcp dst port 25' 2>&1 | /usr/local/sbin/p0f-analyzer.pl 2345 &

One answer would be that this is bourne shell syntax and you shell is csh.

Try

0f -l 'tcp dst port 25'  |& /usr/local/sbin/p0f-analyzer.pl 2345 &

or change your shell to a bourne shell compatible one like bash.

--Alex

PS In csh the ">&" means redirect to a file including stderr, in this 
case the file "1"; then you are telling it to also pipe to something, 
which is impossible since you just redirected to a file.





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?450693A6.7090108>