Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^4: How to print the lines immediately above and below a matching line?

by Anonymous Monk
on Nov 25, 2012 at 18:42 UTC ( #1005517=note: print w/ replies, xml ) Need Help??


in reply to Re^3: How to print the lines immediately above and below a matching line?
in thread How to print the lines immediately above and below a matching line?

Waste of memory? Memory is there to be used ... what are you saving it for?

seriously? This entire "program" is a joke -- grep does it already


Comment on Re^4: How to print the lines immediately above and below a matching line?
Re^5: How to print the lines immediately above and below a matching line?
by roboticus (Canon) on Nov 25, 2012 at 19:16 UTC

    I'm not talking about this program specifically, I was simply responding to the "a waste of memory" statement.

    ...roboticus

    When your only tool is a hammer, all problems look like your thumb.

      I'm not talking about this program specifically, I was simply responding to the "a waste of memory" statement.

      Yes, you were purposefully being obtuse -- sure memory is free and there to be used, but so what? doesn't mean every little program should slurp files for the fun of it to avoid an extra 5 lines of code

Re^5: How to print the lines immediately above and below a matching line?
by Kenosis (Priest) on Nov 25, 2012 at 23:48 UTC

    Unless I'm mistaken, the Solaris grep doesn't support -B -A or -C and there's no native grep on Windows.

      Unless I'm mistaken, the Solaris grep doesn't support -B -A or -C and there's no native grep on Windows.

      I don't see how that is relevant, gnu grep supports it and is available for every platform, including solaris and windows

      Also, ack is egrep

        I don't see how that is relevant, gnu grep supports it and is available for every platform, including solaris and windows

        Also, ack is egrep

        This topic is Bio90's very first request for assistance at PerlMonks. Wouldn't it have been more helpful to have just directly offered grep as a better solution?

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1005517]
help
Chatterbox?
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: (10)
As of 2014-07-29 16:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (222 votes), past polls