Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re^3: Think for yourself. (learn your tools (bash))

by Aristotle (Chancellor)
on Oct 06, 2003 at 11:17 UTC ( #296904=note: print w/ replies, xml ) Need Help??


in reply to Re: Re: Think for yourself.
in thread is the use of map in a void context deprecated ?

$ fgrep blah <foo.txt | consolidate | dump $ preproc <foo.txt | fgrep blah | consolidate | dump $ additional <foo.txt | preproc | fgrep blah | consolidate | dump # vs $ cat foo.txt | fgrep blah | consolidate | dump $ cat foo.txt | preproc | fgrep blah | consolidate | dump $ cat foo.txt bar.txt | additional | preproc | fgrep blah | consolidat +e | dump $ real_stream | additional | preproc | fgrep blah | consolidate | dump
First of all, you're using a shell that's not braindead. Take the time to absorb its expressiveness.
$ < foo.txt fgrep blah | consolidate | dump $ < foo.txt preproc | fgrep blah | consolidate | dump $ < foo.txt additional | preproc | fgrep blah | consolidate | dump
Yes, that's valid code, go ahead and try. And you still don't need to edit more than one place to add multiple files.
$ < foo.txt fgrep blah | consolidate | dump $ < foo.txt preproc | fgrep blah | consolidate | dump $ <(cat foo.txt bar.txt) additional | preproc | fgrep blah | consolida +te | dump $ real_stream | additional | preproc | fgrep blah | consolidate | dump
You don't need crutches in bash. If you need them, something is wrong with your tools.

Makeshifts last the longest.


Comment on Re^3: Think for yourself. (learn your tools (bash))
Select or Download Code
Re: Re^3: Think for yourself. (learn your tools (bash))
by zengargoyle (Deacon) on Oct 06, 2003 at 11:51 UTC

    i couldn't make your

    <(cat file ...)
    example to work, but i've seen the nice bash funcionality in the man pages...

    sadly i can rarely use it. most of my co-workers are stuck in csh hell not even willing to go to tcsh for tab-completion and arrow-history, much less bash despite my constant proselytization. we still have old Solaris boxes without bash that will never have bash (but have Perl 5.003 or so). so it's sh/csh compatible only for me...sigh

    that and the whole Linux vs Solaris with all of the different versions of commands that do slightly different things keeps me going to Perl for anything complex.

    when all our boxes are Solaris 9 with bash i promise to study it more.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://296904]
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: (8)
As of 2014-09-23 02:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (210 votes), past polls