$file_out='my_file';
system("/bin/grep -i errors $file_out");

The above script will give you all the occurrences of
the word you wanted. I have run it on SunW,
Ultra-2,5.7 sparc. 

 --- Nikola Janceski <[EMAIL PROTECTED]>
wrote: > Has anyone run into something like this?
> 
> Specs: solaris 5.6 sparc, Perl 5.6.1
> 
> $file_output = 'output';      # some file with lines that
> contain the word
> 'error' in different lines.
> print  `/bin/grep -i errors $file_output`;
> system("/bin/grep -i errors $file_output");
> 
> the problem:
> I have don't get anything back from either perl
> line. It's something basic
> that I want done at the end of a perlscript.
> But any system/backtick commands that contain 'grep'
> just doesn't return
> anything.
> I check $? and $! and I get "256" and "No such file
> or directory" foreach
> respectively.
> 
> I attempted every variation of the above, (full
> paths, relative paths,
> mixed) and I also attempted to:
> system("cat $file_output | /bin/grep -i errors
> $file_output");
> but nothing.
> If I do cat alone it dumps the file to screen like
> it should but grepping
> shows nothing. YES I did check that I am using the
> right grep path.
> It is only GREP that gives me problems. every other
> command I have used has
> no problems.
> 
> If I use system in the form:
> system PROGRAM ARGS
> with grep in the PROGRAM position perl just hangs
> there waiting.
> 
> Any help would be appreciated, and if anyone has run
> into this problem.
> 
> THANK YOU ALL,
> 
> Nikola Janceski
> 
> When I am working on a problem I never think about
> beauty. I only think
> about how to solve the problem. But when I have
> finished, if the solution is
> not beautiful, I know it is wrong.
> -- Buckminster Fuller (1895-1983) 
> 
> 
>
----------------------------------------------------------------------------
> --------------------
> The views and opinions expressed in this email
> message are the sender's
> own, and do not necessarily represent the views and
> opinions of Summit
> Systems Inc.
> 
> 
> -- 
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
>  

__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to