| 1 | #!/bin/shscip-shell filesystem . . `/bin/sh`. |
| 2 | |
| 3 | # count the cookies |
| 4 | A=`grepscip-shell system . . grep. "^%" \`find ../data -type f\` | wcscip-shell system . . wc. -l` |
| 5 | # count the additional cookies |
| 6 | if [scip-shell system . . `[`. -d ../data-more ] ; then |
| 7 | datamore=`findscip-shell system . . find. ../data-more -type f` |
| 8 | if [scip-shell system . . `[`. _"" != _"${datamore}" ] ; then |
| 9 | Ax=`grepscip-shell system . . grep. "^%" ${datamore} | wcscip-shell system . . wc. -l` |
| 10 | fi |
| 11 | fi |
| 12 | # count data which are to be formated |
| 13 | B=`wcscip-shell system . . wc. -l ../predata/pre* | tailscip-shell system . . tail. -n1 | sedscip-shell system . . sed. "s/ *\([0-9]*\).*/\1/"` |
| 14 | # count the recipes |
| 15 | C=0 |
| 16 | for rec in `findscip-shell system . . find. ../rezepte -type d` ; do |
| 17 | if [scip-shell system . . `[`. $rec != "../rezepte" ] ; then |
| 18 | x=`lsscip-shell system . . ls. $rec | wcscip-shell system . . wc. -l | tailscip-shell system . . tail. -n1 | sedscip-shell system . . sed. "s/ *\([0-9]*\).*/\1/"` |
| 19 | C=$(($C+$x)) |
| 20 | fi |
| 21 | done |
| 22 | # sum of all |
| 23 | echoscip-shell system . . echo. $A + $Ax + $B + $C = $(($A+$Ax+$B+$C)) |