June 2006
Intermediate to advanced
64 pages
2h 42m
English
exec
exec [commandargs…] exec [-aname] [-cl] [commandargs… ]
Execute command in place of the current process (instead of creating a new process). exec is also useful for opening, closing, or copying file descriptors.
-aUse name for the value of
argv[0].
-cClear the environment before executing the program.
-lPlace a minus sign at the front of argv[0], just as
login(1) does.
trap ′exec 2>&-′ 0 Close standard error when shell script exits (signal 0) $exec /bin/cshReplace shell with C shell $exec < infileReassign standard input to infile
Read now
Unlock full access