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

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??

In both zsh and bash the "command" shell builtin (and its cousin builtin) are helpers for bypassing shell functions or aliases. When you prefix something with it then the shell explicitly searches for an external thing to run rather than running any shell function or builtin of the same name. The usual usage is for something like having a shell function of the same name wrapping something (to say manipulate arguments passed) whenever in the function you want to actually call the "real" program (or in the case of builtin the shell's actual builtin command of the same name (e.g. you could write a cd shell fn which then actually calls builtin cd blahblah to make the shell change the cwd)). If you didn't then the shell would just recursively call the same function over and over.

At any rate two closing thoughts: zsh is just awesome and anyone not using it as their interactive or programming shell is missing out; and unless you've got some reaaaaaly wonky default shell environment you're dealing with there's probably not much reason to prefix something you're calling from perl (or anything else "external") with it "command".

(The command in /usr/bin on OSX is actually a bash script actually which calls builtin which is just weird . . .)

Edit: made advice about "command" being unneeded more explicit.

The cake is a lie.
The cake is a lie.
The cake is a lie.

In reply to Re^2: Can't exec "command": No such file or directory error by Fletch
in thread Can't exec "command": No such file or directory error by nysus

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":

  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?

What's my password?
Create A New User
Domain Nodelet?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (5)
As of 2023-10-03 10:19 GMT
Find Nodes?
    Voting Booth?

    No recent polls found