Taylor Lewick wrote:
> 
> One more for everyone...
> In my perl script, I did a quick cheat by using the systems grep
> command...
> I tried:
> `/usr/bin/grep -v "BLAH" | /usr/bin/grep -v "COW" | /usr/bin/grep -v
> "STUFF" file1>file2`;
> 
> And this doesn't work.  Sometimes it will get rid of STUFF.  It seems to
> only act on the last grep I use.  I tried escaping the pipes, but that
> didn't work.  Any ideas?

Yes, you have the file name in the wrong place.  The syntax is "do
something to FILE | pipe data to second process | pipe data to third
process > redirect STDOUT to a file".  What you have is "do something to
STDIN | pipe data to second process | pipe data to third process but use
FILE instead > redirect STDOUT to a file".  You have to specify the file
name on the first process in the pipeline.


John
-- 
use Perl;
program
fulfillment

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to