> The overall problem is not if grep works or not, but why the
> output from the backticks does not show up in the cgi. I only put
> the grep in there to make the code read easier. $results does not
> have anything in the cgi with or without the grep. Below is the code
> again. Am I not
> > print `/usr/bin/dig -x $ip | /usr/bin/grep PTR`;
> >
> > does not.
>
> Works fine on my system, as it should. Are you sure your grep
> is in /usr/bin?
whereis grep
grep: /usr/5bin/grep /usr/bin/grep /usr/man/man1/grep.1v
/usr/5bin/grep also does not work.
g
--
To unsubscribe,
> -Original Message-
> From: Gary Hawkins [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, October 31, 2001 4:17 PM
> To: Robert Thompson; [EMAIL PROTECTED]
> Subject: RE: Outputting shell command to a browser
>
>
> Pipe not working with /usr/bin/grep.
Pipe not working with /usr/bin/grep. Why is that?
Notice...
print `/usr/bin/dig -x $ip | grep PTR`;
works, but:
print `/usr/bin/dig -x $ip | /usr/bin/grep PTR`;
does not.
Another alternative:
$results = join("", grep(/PTR/, `/usr/bin/dig -x $ip`));
/g
> -