Ilias Karim
Ilias Karim

Reputation: 5397

Trap on DEBUG signal for the Alpine Shell (ash)?

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

Answers (0)

Related Questions