La commande "TRAP" sur LINUX

OP
S2

sh2lac

il y a 10 mois

commande très pratique qui permet d'installer un signal handler https://image.noelshack.com/fichiers/2021/23/3/1623203478-efhdfh.gif

voici un exemple d'utilisation https://image.noelshack.com/fichiers/2021/23/3/1623203478-efhdfh.gif

preexit() { echo "Hello World!" } trap preexit SIGINT sleep infinity

https://image.noelshack.com/fichiers/2021/23/3/1623203478-efhdfh.gif