Des données sur le passage à Calais - retour accueil
git clone git://bebou.netlib.re/calais-data
Log | Files | Refs |
weekdays.sh (560B)
1 #! /bin/sh 2 3 tmpd=$(mktemp -d) 4 5 tail -n+2 | 6 cut -f-2 | 7 paste - - - - - - - | 8 head -n-1 | 9 cut --complement -f3,5,7,9,11,13 > $tmpd/t1 10 11 < $tmpd/t1 cut --complement -f1 | 12 tr ' ' '+' | 13 sed 's,+$,,' | 14 bc -l | 15 paste $tmpd/t1 - > $tmpd/t2 16 17 for i in $(seq 2 8);do 18 < $tmpd/t2 tail -n+2 | cut -f$i | paste -s -d+ | bc -l 19 done | paste - - - - - - - > $tmpd/tots 20 21 < $tmpd/tots tr '\t' '+' | bc -l > $tmpd/fulltot 22 23 echo "date monday tuesday wednesday thursday friday saturday sunday total" 24 cat $tmpd/t2 25 echo " $(cat $tmpd/tots) $(cat $tmpd/fulltot)" 26 27 rm -rf $tmpd 28