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

A file has multiple records each having three 30-bit long fields(field1,field2,field3).There is also a lookup file,LOOK_UP.dat.Now, we need to consider only the last ten digits of field1 and lookup the file LOOK_UP.dat. If there a match then field2 and field3 should replaced with corresponding data from the lookup file. otherwise that particular record,for which there is no match, should be stored in a seperate file.

2 Answers   Wipro,


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

1 Answers  


Hi Friends, I am currently Undergoing Course On Testing.I am Planning To Keep Fake Resume.Can any One tell me the ways to Prepare i.e, Real Time experience For Manual Testing. With Regards, Vikram

1 Answers  


What is shell company all about?

0 Answers  


defination of mapfile in winrunner?

0 Answers  


What are the zombie processes?

0 Answers  


why did you apply to shell

3 Answers   Shell,


write a shell script to find the largest number from 3 given numbers.

6 Answers  


c program to display the information of given file similar to givan by the unix or linux command ls -l

0 Answers   IBM,


How many fields are present in a crontab file and what does each field specify?

0 Answers  


What is c in shell script?

0 Answers  


State the advantages of shell scripting?

0 Answers  


Categories