In Linux Programming:
Ans 1 )execa shell built-in, which replaces the image of the current process with new process. It's not same as calling a binary/executable.
To see the difference, do:
#script1 python test.py echo Hello #script2 exec python test.py echo Hello
You will not see the Hello getting printed in the second script.
exec also another purpose in shells. It can be used for redirection. For example,
exec 1>file
redirects the stdout of the process to file.
If you had:
exec 1>file echo hello echo world
then script would redirect hello and world to file instead of stdout.
Ans 2) We need three file permissions to give allow usage permissions to different set of people using that file those would be the owner of file,group and the world.
In Linux Programming: What is the difference between running program with and without exec? Why do...