The shell built-in exec command is used for executing commands in shell scripts. It replaces the shell process with the specified command. It can be very helpful when performing certain operations over the file.
Table of contents
1. Use the exec command to replace process in shell script2. Use exec command in shell scripts for logging3. Change standard input to read files using exec4. Change file descriptors using exec in the shell script (advanced)Do more by pairing exec with the find commandSort: