I have a bash script that takes multiple arguments and I want to log what command is used to run it. For example if the command looks like this:
bash my_script.sh -a 1 -b 2 -c 3
I want the script to write this exact line to a file like log.txt .
I have a bash script that takes multiple arguments and I want to log what command is used to run it. For example if the command looks like this:
bash my_script.sh -a 1 -b 2 -c 3
I want the script to write this exact line to a file like log.txt .