Reputation: 5397
With the bash
shell, you can install a trap on the synthetic DEBUG signal. This is useful and will execute your function or bit of code on every shell command, not so in ash
, however. E.g.
$ trap 'echo hi' DEBUG -ash: trap: DEBUG: invalid signal specification
How do you trap the DEBUG signal in ash
?
Upvotes: 2
Views: 431