I want to log the full name of the script executed by the user including the options/arguments he provided to that script.
I was able to achieve some success using basename
and whoami
but it does not give me the arguments.
Example: let's assume user ran script like this
root@host1:./collect_user_summary.ksh -h 20 -l 10 -x local
Desired Output in my log file:
"collect_user_summary.ksh -h 20 -l 10 -x local"
What I have managed to achieve: with basename
and whoami
I was able to get
"collect_user_summary.ksh username"
My environment: Solaris 10, kornshell.
$*
(or$@
) work inksh
?