Is there a way to capture all commands executed in a
bash or even better in
I need a wrapper script that gets called everytime a command is executed. Like when I type
cd /home/ I want my wrapper script
command_wrapper.sh to be called. Inside I want to cancel the command or call another command.
#!/bin/sh #command_wrapper.sh echo "you tried to call the command [$@]"
It also would be okay if the script only gets called when a command doesn't exist. Is this possible?