Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

View file

@ -0,0 +1,7 @@
c="1"
# Trap signals for SIGQUIT (3), SIGABRT (6) and SIGTERM (15)
trap "echo -n 'We ran for ';echo -n `expr $c /2`; echo " seconds"; exit" 3 6 15
while [ "$c" -ne 0 ]; do # infinite loop
# wait 0.5 # We need a helper program for the half second interval
c=`expr $c + 1`
done

View file

@ -0,0 +1,10 @@
#!/bin/bash
trap 'echo "Run for $((s/2)) seconds"; exit' 2
s=1
while true
do
echo $s
sleep .5
let s++
done

View file

@ -0,0 +1,19 @@
#!/bin/bash
trap 'echo "Run for $((s/2)) seconds"; exit' 2
s=1
half_sec_sleep()
{
local save_tty=$(stty -g)
stty -icanon time 5 min 0
read
stty $save_tty
}
while true
do
echo $s
half_sec_sleep
let s++
done

View file

@ -0,0 +1,2 @@
TRAPINT(){ print $n; exit }
for (( n = 0; ; n++)) sleep 1