I'm not super familiar with exec. I was running through some tests and examples. I wanted to pass a command written in a file to it. I'm expecting that command to be run with exec just as if it were run directly on the commandline. Here's what I set up and tried:
[kellyry@ch12ldvela00 ~]$ cat exec_test
ls
[kellyry@ch12ldvela00 ~]$ cat exec_test | exec
[kellyry@ch12ldvela00 ~]$ cat exec_test | xargs exec
xargs: exec: No such file or directory
[kellyry@ch12ldvela00 ~]$ exec ls
exec_test file2 file3
. . .
Here's the weirdest part. Running the last line exec ls doesn't return. That is the terminal hangs and I can't communicate with it. I'm thinking this last problem could be an issue with Mobaxterm which I'm using to ssh in to the server.