whta is the use of "exec" command?

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

Write a command sequence to find the count of each word?

771


What is shift command in shell script?

764


What are zombie processes?

795


What is shell geeksforgeeks?

808


How do I open the shell in cmd?

812


How to write a function?

820


I want to monitor a continuously updating log file, what command can be used to most efficiently achieve this?

993


What is .sh file in mac?

790


How will you pass and access arguments to a script in linux?

843


What is computer cli?

687


Set up a Sev 2 alert when the Primary WA service fails. A windows batch script needs to be created that will monitor the WA service on the Primary and when the service stops/fails a Sev 2 TT is generated for a particular team ?

1950


State the advantages of shell scripting?

854


What shell is bin sh?

734


What is another name for a bash shell script that you might see?

1248


How to print all the arguments provided to the script?

791