I have a Linux shell script (test_script) that receives arguments, that are later interpreted by the same shell script and assigns the incoming arguments to some parameters. Now, is there a way to write the shell calling command to a log file as is?
Explanation:
I call the test_script as follows:
sh test_script -u test_user -d test_dir
Within the same test_script I want to write some piece of code that can log the incoming shell calling command as is to a log file. I.e., when I open the log file, I should be able to see
sh test_script -u test_user -d test_dir