Run shell script on a command
- by LinuxPenseur
Hi,
I want to run a shell script when date -s <string> command is used. For example i want to log the command to the file /tmp/user.log by executing the following command in the shell script
logger -p user.notice "date -s command executed" -f /tmp/user.log
How can run a shell script when date -s <string> is executed on the shell?
To make it more general, I want to run my shell script when someone else issues a particular linux command on my system. How to do this?