Loading ...
Sorry, an error occurred while loading the content.

Re: [PBML] Faith restored..

Expand Messages
  • fkleinbu@lazy-kay.com
    ... Then you will be quite happy to know I have broken my very bad habbit of using: cat |grep .. It was just the way the instructor showed
    Message 1 of 5 , Feb 1, 2006
    • 0 Attachment
      >From: merlyn@...
      >Date: 01 Feb 2006 07:36:15 -0800
      >
      >I still rant when someone uses a useless use of cat (described
      >at http://en.wikipedia.org/wiki/Useless_use_of_cat). And the response
      >I get now is "so what, it's clearer to me, and CPU is cheap". Kids.
      >Get off my lawn. And turn that music down.
      >
      >:-)

      Then you will be quite happy to know I have broken my very bad habbit
      of using:

      cat <some filename>|grep <args>..

      It was just the way the instructor showed us (back in '84) and I've
      stuck with it until most recently.. And sorry, though approaching 2
      score and 10, I still like my music up real loud <grin>.. flk k
    • fkleinbu@lazy-kay.com
      ... I ve been told a guru is one who knows 10% more than the person asking the question .. ... [snip] I was recently tasked to re-write a shell script
      Message 2 of 5 , Feb 1, 2006
      • 0 Attachment
        >From: Peter Dominey <pdominey@...>
        >Date: Wed, 01 Feb 2006 09:29:09 -0600
        >
        >
        >While not a Perl guru, hence my subscription to this group, I have to
        >concur with your thoughts.
        >
        I've been told a guru is one who knows 10% more than the person asking
        the question <grin>..
        >
        >I too have very strong suspicion that so much of the code today is buggy
        >and error prone because there is no strong desire or requirement to
        >produce clean, efficient, tight code.
        [snip]

        I was recently tasked to re-write a shell script file monitor in perl..
        Reading the shell script, I came to the point in which the code determined
        the file name, and then performed a read of the directory, loading in each
        occurance of the file name into an array, then looping though the array,
        calculating how many file names were returned, and then added some logic
        to
        get the correct file..

        While the code to do this was fairly nice and compact, the way the filename
        was constructed, there could never be more than a single file name returned..

        The whole section could have been done with a "if ( -e <filename> )".. I
        was
        in disbelief..

        flk k
      Your message has been successfully submitted and would be delivered to recipients shortly.