Been testing some stuff and started lab 8
This commit is contained in:
16
Misc/itsatrap.sh
Executable file
16
Misc/itsatrap.sh
Executable file
@@ -0,0 +1,16 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Jack-Benny Persson
|
||||
# LX13
|
||||
# Testing out traps
|
||||
|
||||
trap "echo ' I have just trapped CTRL+C'" SIGINT SIGTERM
|
||||
trap "echo ' Dont stop me plz'" SIGTSTP
|
||||
trap "echo ' Ok, just exit'" EXIT
|
||||
|
||||
for (( i=60; i>=0; i-- )); do
|
||||
echo $i
|
||||
sleep 1
|
||||
done
|
||||
|
||||
exit 0
|
Reference in New Issue
Block a user