langs a-z

This commit is contained in:
Ingy döt Net 2013-04-10 22:43:41 -07:00
parent db842d013d
commit d066446780
11389 changed files with 98361 additions and 1020 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,2 @@
TRAPINT(){ print $n; exit }
for (( n = 0; ; n++)) sleep 1