Re: Why no exec command in RHEL5



On 24Apr2011 23:23, Abhilash abhi <abhilashck72@xxxxxxxxx> wrote:
| Why there is no command `exec` in RHEL5.
|
| [root@localhost ~]# which exec
| /usr/bin/which: no exec in
| (/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/root/bin)

"exec" is a shell builtin; it _cannot_ be a standalone command.

| because of this i am not able to execute finds output using exec!!

Urr, or as another poster points out, the "exec" in find is a switch,
and is spelt "-exec". Eg:

find . -type d -exec ls -ld {} ';'

See "man find" for details.

Cheers,
--
Cameron Simpson <cs@xxxxxxxxxx> DoD#743
http://www.cskk.ezoshosting.com/cs/

The ship is cold -- and damp. I complain -- but no one listens.
- Capt. Kirk, Star Trek XXIII: _So Very Tired_
Jim Hill <jimhill@xxxxxxxxxxxxxxxx>

--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list



Relevant Pages

  • Re: Sleep freezing
    ... >> man exec. ... > form of a standard shell pipeline where each arg becomes one ... > word of a command, and each distinct command becomes a sub- ... The word "execute" means to replace the program running in the calling ...
    (comp.unix.shell)
  • Re: du command failing
    ... directory if the directory does not have a Read or Execute permission. ... From UNIX command line i have executed 'du' command. ... From [exec] manpage: ...
    (comp.lang.tcl)
  • RE: COMMAND field of TSO LOGON panel
    ... The issue is that the logon proc being executed directly launches into ISPF, ... If you exit ISPF, allow the exec to run, then reenter ISPF ... COMMAND field of TSO LOGON panel ... However,it didn't execute it. ...
    (bit.listserv.ibm-main)
  • Re: exec() gives output??
    ... > I'd like to execute a command on the server ... > particular command takes a long time to execute, ... A successful call to exec() replaces the Perl script with whatever execis ...
    (comp.lang.perl.misc)
  • Re: wScript.Shell Problems
    ... the completion of the underlying process. ... However, the Exec procedure is ... Here is why i went to the RUN command, it is my understanding that the ... EXEC command does not allow for the BOOLEAN indicating wether the ...
    (microsoft.public.scripting.vbscript)