Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot

Re: Arrays and grep problems

by hippo (Parson)
on Jan 25, 2014 at 10:20 UTC ( #1072053=note: print w/ replies, xml ) Need Help??

in reply to lolhackedlol

You have changed the code in your original post. Please don't do that as it renders some of the previous answers non-sensical and prevents readers of the whole thread in future from understanding it. Have a read of How do I change/delete my post? particularly the section headed It is uncool to update a node in a way that renders replies confusing or meaningless.

Your newer code works as it stands (albeit that one might have written it somewhat differently). If it is printing every line from the log, that will be because every line in the log matches. You can confirm this yourself using the system grep:

grep -f /home/user/Desktop/keywords /var/log/syslog

If you have a colourising system grep this will make it very clear where the matches are occurring.

Comment on Re: Arrays and grep problems
Download Code

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1072053]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (9)
As of 2016-04-29 15:04 GMT
Find Nodes?
    Voting Booth?
    :nehw tseb si esrever ni gnitirW

    Results (441 votes). Check out past polls.