mktbl (384B)
1 #!/bin/sh 2 3 4 unset LC_ALL 5 LC_COLLATE=C 6 set -e 7 8 for i 9 do 10 case $i in 11 -c) 12 cpu=$2 13 shift 2 14 ;; 15 -*) 16 echo mktbl: incorrect parameter:$i >&2 17 exit 1 18 ;; 19 esac 20 done 21 22 rm -f $$.c $family/${cpu}tbl.c 23 trap "rm -f $$.c" 0 2 3 24 25 awk '!/^$/ {print $1,NR,$2,$3,$4,$5,$6}' ops.dat | 26 sort -k1 -k2n | 27 LC_ALL=C awk -v cpu=`echo $cpu | tr a-z A-Z` -f ../mktbl.awk > $$.c && 28 mv $$.c ${cpu}tbl.c