whta is the use of "exec" command?



whta is the use of "exec" command?..

Answer / ashu

The exec command will execute a command in place of the
current shell; that is, it terminates the current shell and
starts a new process in its place.

Use of exec command:

exec is oftenly used to execute the last command of a shell
script. This would kill the shell slightly earlier;
otherwise, the shell would wait until the last command was
finished. This practice saved a process and some memory.

Is This Answer Correct ?    2 Yes 0 No

Post New Answer

More Shell Script Interview Questions

what do u mean by $#,$* in unix programming?

5 Answers   Convergys, TCS,


What exactly is a shell?

0 Answers  


Script S1 (which copies .dat files from one directory1 to another directory2) run continuously. Write Script S2 which kills S1 first, compresses all .dat files in directory1 and directory2 successfully, re-run Script S1 and stops self i.e. S2.

2 Answers   IBM, TCS,


What is shell application?

0 Answers  


Why is used in shell scripting?

0 Answers  






What is the use of "shift" command in passing parameters?

1 Answers  


What is awk in shell scripting?

0 Answers  


What is path in shell script?

0 Answers  


What are the various stages of a linux process it passes through?

0 Answers  


Determine the output of the following command: name=shubham && echo ‘my name is $name’.

0 Answers  


What are filters explain sort with all the options available?

0 Answers  


how will you find the total disk space used by a specific user?

0 Answers  


Categories