Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^4: OT: Advantage of not expanding wildcard in the shell

by Aristotle (Chancellor)
on Jan 28, 2005 at 20:41 UTC ( [id://426098]=note: print w/replies, xml ) Need Help??


in reply to Re^3: OT: Advantage of not expanding wildcard in the shell
in thread using wildcard character * in perlscript command line

neither will ever break if the number of files that match, grows above some arbitrary number.

Well, when working with find, xargs is a natural choice anyway. And I've only ever needed to reach for xargs once where I wouldn't otherwise have just because the number of files in a single directory had grown too large.

it is usually easier (for me) to reach for a scripting tool, like Perl or REXX, than to piece together all the bits I need from the shell language and syntax.

That's a matter of practice. If you keep avoiding shell, you'll never learn it, and the things shell does well cost much more effort to do with a more fully featured language like Perl, so on the bottom line you are wasting a lot of energy. (Cf. false laziness.) But if you don't need it often to begin with, then again it's a wasted investment indeed.

The phenomenon that it takes even a well versed shell user a few tries to piece a complex command together is pretty common; but I like doing it that way. To quote Larry, “The fact that it takes a little hard work from the programmer to make the computer do hard work should not be a consideration when the payoff is big.”

You can do just about anything you like from with emacs. The problem comes when you don't have (or are not allowed to use) your own, highly configured version of that editor.

That was one of the two primary motivations for my sticking with a vi, namely, Vim (the other being that vi's model of thinking about text manipulation feels like a closer match to how I think when I edit, though modal editing still takes getting used to at first). While working without my .vimrc on foreign system is sometimes annoying, it is not a real problem: the default configuration is extensive and pretty sensible so just give me a vi and I'm ready to rumble. If in the course of a task I really miss some personal settings then they're easy to reconstruct anyway, since any task only involves a subset of all of my preferred options. Reconstructing it just takes a few quick :sets.

The choice has served me so well already in the few years since I made it that I'm at least as fanatical about Vim as I am about Perl. First thing I do on any machine I have to work on is install Vim if it's not there already. And Vim is available for just about every possible platform with a full-sized keyboard. I don't expect to ever be stranded without it regardless of where time takes me, as oposed to other great but platform specific editors.

If you haven't made a serious attempt to get accustomed to it, do yourself a favour and try it.

Makeshifts last the longest.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (2)
As of 2024-03-19 07:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found