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

What is shell environment?

548


What is meant by dos operating system?

578


What is awk in shell scripting?

561


What is echo $shell?

628


What is scripting autism?

705






write a shell script to emulate the Id command of PRIMOS which lists files and directories. It list files first with a header FILES and then directories with a header DIRECTORIES. This command has several options. The main ones are. -file select files only -dir select directories only -reverse sort in reverse order -no_header put no header on the output -brief output the header only -size display the size of each file -help display Id´s syntax and options.

2233


Using set -A write a script to print the output of the ls command in 5 columns with two spaces between each column. Pretend that ls does not have multicolumn output.

2178


What is console line?

574


How do we delete all blank lines in a file?

579


Is bash an operating system?

550


What is bash shell command?

562


how to print the matrix form of 2-d, 3-d arrays in unix c shell scripts ?

3608


What's the difference between scripting and coding?

601


What are the different types of shell scripting?

542


What is bourne shell scripting?

537