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 is Linux language details

0 Answers   Quick Heal,


How can I send a mail with a compressed file as an attachment?

0 Answers  


What are the advantages of shell scripting?

0 Answers  


What is sudo command?

0 Answers  


What command needs to be used to take the backup?

0 Answers  






What does egrep mean?

0 Answers  


what is the difference between writing code in shell and editor?

1 Answers  


Explain about gui scripting?

0 Answers  


What is bash coding?

0 Answers  


How to sort a result of Ls -l command based on columns. Ex. i want to sort 5th column from output of ls -l command.

6 Answers   TCS,


How can you find out how long the system has been running?

0 Answers  


write a shell script that accepts name from user and creates a directory by the path name, then creates a text file in that directory and stores in it, the data accepted from user till STOP, displays the no. of characters stored in the file.Program stops if directory name is null

1 Answers  


Categories