Ambiguous output redirect

Alex Zbyslaw xfb52 at
Tue Sep 12 04:02:02 PDT 2006

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/ 2345 &

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


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

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


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.

More information about the freebsd-questions mailing list