1*1aaed33eSGabor Kovesdan#!/bin/sh 2*1aaed33eSGabor Kovesdan 3*1aaed33eSGabor Kovesdanrm -rf siks 4*1aaed33eSGabor Kovesdanmkdir -p siks 5*1aaed33eSGabor Kovesdan 6*1aaed33eSGabor Kovesdanexport GNUSORT_NUMERIC_COMPATIBILITY=x 7*1aaed33eSGabor Kovesdan 8*1aaed33eSGabor KovesdanBSDSORT=../sort 9*1aaed33eSGabor KovesdanGNUSORT=~/coreutils/bin/sort 10*1aaed33eSGabor Kovesdan#GNUSORT=sort 11*1aaed33eSGabor Kovesdan 12*1aaed33eSGabor KovesdanFILECMP=cmp 13*1aaed33eSGabor Kovesdan 14*1aaed33eSGabor KovesdanINPUT_FILE=si 15*1aaed33eSGabor Kovesdan 16*1aaed33eSGabor Kovesdanrm -rf test.log 17*1aaed33eSGabor Kovesdan 18*1aaed33eSGabor Kovesdan#ru_RU.ISO-8859-5 en_US.ISO8859-15 zh_HK.Big5HKSCS 19*1aaed33eSGabor Kovesdan# 20*1aaed33eSGabor Kovesdan# ru KOI-8 is an "irregular" locale with non-trivial ordering. 21*1aaed33eSGabor Kovesdan# zh* is a 2-bytes locale 22*1aaed33eSGabor Kovesdan 23*1aaed33eSGabor Kovesdanfor lang in ru_RU.KOI8-R C ru_RU.ISO-8859-5 en_US.ISO8859-15 zh_HK.Big5HKSCS 24*1aaed33eSGabor Kovesdando 25*1aaed33eSGabor Kovesdan 26*1aaed33eSGabor Kovesdan export LANG=${lang} 27*1aaed33eSGabor Kovesdan 28*1aaed33eSGabor Kovesdan for KEYS in -srh -sfrudb -Vs -sM -siz 29*1aaed33eSGabor Kovesdan do 30*1aaed33eSGabor Kovesdan 31*1aaed33eSGabor Kovesdan echo ${LANG} ${KEYS} 32*1aaed33eSGabor Kovesdan 33*1aaed33eSGabor Kovesdan ${BSDSORT} ${KEYS} ${INPUT_FILE} -o siks/sik1 34*1aaed33eSGabor Kovesdan ER=$? 35*1aaed33eSGabor Kovesdan if ! [ ${ER} -eq 0 ] ; then 36*1aaed33eSGabor Kovesdan echo ${LANG} ${KEYS} crash >> test.log 37*1aaed33eSGabor Kovesdan exit 38*1aaed33eSGabor Kovesdan fi 39*1aaed33eSGabor Kovesdan ${GNUSORT} ${KEYS} ${INPUT_FILE} -o siks/sik2 40*1aaed33eSGabor Kovesdan if ! ${FILECMP} siks/sik1 siks/sik2 >siks/res.0.0 2>&1 ; then 41*1aaed33eSGabor Kovesdan echo ${LANG} ${KEYS} error >> test.log 42*1aaed33eSGabor Kovesdan fi 43*1aaed33eSGabor Kovesdan ${BSDSORT} -c ${KEYS} siks/sik1 44*1aaed33eSGabor Kovesdan ER=$? 45*1aaed33eSGabor Kovesdan if ! [ ${ER} -eq 0 ] ; then 46*1aaed33eSGabor Kovesdan echo ${LANG} ${KEYS} -c error >> test.log 47*1aaed33eSGabor Kovesdan fi 48*1aaed33eSGabor Kovesdan rm siks/res.0.0 49*1aaed33eSGabor Kovesdan 50*1aaed33eSGabor Kovesdan ${BSDSORT} ${KEYS} -t " " ${INPUT_FILE} -o siks/sik1 51*1aaed33eSGabor Kovesdan ER=$? 52*1aaed33eSGabor Kovesdan if ! [ ${ER} -eq 0 ] ; then 53*1aaed33eSGabor Kovesdan echo ${LANG} ${KEYS} -t " " crash >> test.log 54*1aaed33eSGabor Kovesdan exit 55*1aaed33eSGabor Kovesdan fi 56*1aaed33eSGabor Kovesdan ${GNUSORT} ${KEYS} -t " " ${INPUT_FILE} -o siks/sik2 57*1aaed33eSGabor Kovesdan if ! ${FILECMP} siks/sik1 siks/sik2 >siks/res.0.0 2>&1 ; then 58*1aaed33eSGabor Kovesdan echo ${LANG} ${KEYS} error -t " " >> test.log 59*1aaed33eSGabor Kovesdan fi 60*1aaed33eSGabor Kovesdan ${BSDSORT} -c -t " " ${KEYS} siks/sik1 61*1aaed33eSGabor Kovesdan ER=$? 62*1aaed33eSGabor Kovesdan if ! [ ${ER} -eq 0 ] ; then 63*1aaed33eSGabor Kovesdan echo $? ${LANG} ${KEYS} -t " " -c error >> test.log 64*1aaed33eSGabor Kovesdan fi 65*1aaed33eSGabor Kovesdan rm siks/res.0.0 66*1aaed33eSGabor Kovesdan 67*1aaed33eSGabor Kovesdan ${BSDSORT} ${KEYS} -t "|" ${INPUT_FILE} -o siks/sik1 68*1aaed33eSGabor Kovesdan ER=$? 69*1aaed33eSGabor Kovesdan if ! [ ${ER} -eq 0 ] ; then 70*1aaed33eSGabor Kovesdan echo ${LANG} ${KEYS} -t "|" crash >> test.log 71*1aaed33eSGabor Kovesdan exit 72*1aaed33eSGabor Kovesdan fi 73*1aaed33eSGabor Kovesdan ${GNUSORT} ${KEYS} -t "|" ${INPUT_FILE} -o siks/sik2 74*1aaed33eSGabor Kovesdan if ! ${FILECMP} siks/sik1 siks/sik2 >siks/res.0.0 2>&1 ; then 75*1aaed33eSGabor Kovesdan echo ${LANG} ${KEYS} error -t "|" >> test.log 76*1aaed33eSGabor Kovesdan fi 77*1aaed33eSGabor Kovesdan ${BSDSORT} -c -t "|" ${KEYS} siks/sik1 78*1aaed33eSGabor Kovesdan ER=$? 79*1aaed33eSGabor Kovesdan if ! [ ${ER} -eq 0 ] ; then 80*1aaed33eSGabor Kovesdan echo ${LANG} ${KEYS} -c -t "|" error >> test.log 81*1aaed33eSGabor Kovesdan fi 82*1aaed33eSGabor Kovesdan rm siks/res.0.0 83*1aaed33eSGabor Kovesdan 84*1aaed33eSGabor Kovesdan ${BSDSORT} ${KEYS} -t '\0' ${INPUT_FILE} -o siks/sik1 85*1aaed33eSGabor Kovesdan ER=$? 86*1aaed33eSGabor Kovesdan if ! [ ${ER} -eq 0 ] ; then 87*1aaed33eSGabor Kovesdan echo ${LANG} ${KEYS} -t 0 crash >> test.log 88*1aaed33eSGabor Kovesdan exit 89*1aaed33eSGabor Kovesdan fi 90*1aaed33eSGabor Kovesdan ${GNUSORT} ${KEYS} -t '\0' ${INPUT_FILE} -o siks/sik2 91*1aaed33eSGabor Kovesdan if ! ${FILECMP} siks/sik1 siks/sik2 >siks/res.0.0 2>&1 ; then 92*1aaed33eSGabor Kovesdan echo ${LANG} ${KEYS} error -t '\0' >> test.log 93*1aaed33eSGabor Kovesdan fi 94*1aaed33eSGabor Kovesdan ${BSDSORT} -c -t '\0' ${KEYS} siks/sik1 95*1aaed33eSGabor Kovesdan ER=$? 96*1aaed33eSGabor Kovesdan if ! [ ${ER} -eq 0 ] ; then 97*1aaed33eSGabor Kovesdan echo ${LANG} ${KEYS} -c -t '\0' error >> test.log 98*1aaed33eSGabor Kovesdan fi 99*1aaed33eSGabor Kovesdan rm siks/res.0.0 100*1aaed33eSGabor Kovesdan 101*1aaed33eSGabor Kovesdan for f1 in 1 2 3 4 5 6 7 8 9 102*1aaed33eSGabor Kovesdan do 103*1aaed33eSGabor Kovesdan for c1 in 1 2 3 4 5 10 15 20 25 30 104*1aaed33eSGabor Kovesdan do 105*1aaed33eSGabor Kovesdan echo ${LANG} ${KEYS} ${f1} ${c1} 106*1aaed33eSGabor Kovesdan 107*1aaed33eSGabor Kovesdan ${BSDSORT} ${KEYS} +${f1}.${c1} ${INPUT_FILE} -o siks/sik1 108*1aaed33eSGabor Kovesdan ER=$? 109*1aaed33eSGabor Kovesdan if ! [ ${ER} -eq 0 ] ; then 110*1aaed33eSGabor Kovesdan echo ${LANG} ${KEYS} +${f1}.${c1} crash +- >> test.log 111*1aaed33eSGabor Kovesdan exit 112*1aaed33eSGabor Kovesdan fi 113*1aaed33eSGabor Kovesdan ${GNUSORT} ${KEYS} +${f1}.${c1} ${INPUT_FILE} -o siks/sik2 114*1aaed33eSGabor Kovesdan if ! ${FILECMP} siks/sik1 siks/sik2 >siks/res.${f1}.${c1} 2>&1 ; then 115*1aaed33eSGabor Kovesdan echo ${LANG} ${KEYS} +${f1}.${c1} error +- >> test.log 116*1aaed33eSGabor Kovesdan fi 117*1aaed33eSGabor Kovesdan ${BSDSORT} -c ${KEYS} +${f1}.${c1} siks/sik1 118*1aaed33eSGabor Kovesdan ER=$? 119*1aaed33eSGabor Kovesdan if ! [ ${ER} -eq 0 ] ; then 120*1aaed33eSGabor Kovesdan echo ${LANG} ${KEYS} +${f1}.${c1} -c error +- >> test.log 121*1aaed33eSGabor Kovesdan fi 122*1aaed33eSGabor Kovesdan rm siks/res.${f1}.${c1} 123*1aaed33eSGabor Kovesdan 124*1aaed33eSGabor Kovesdan ${BSDSORT} ${KEYS} -k${f1}.${c1} ${INPUT_FILE} -o siks/sik1 125*1aaed33eSGabor Kovesdan ER=$? 126*1aaed33eSGabor Kovesdan if ! [ ${ER} -eq 0 ] ; then 127*1aaed33eSGabor Kovesdan echo ${LANG} ${KEYS} -k${f1}.${c1} crash >> test.log 128*1aaed33eSGabor Kovesdan exit 129*1aaed33eSGabor Kovesdan fi 130*1aaed33eSGabor Kovesdan ${GNUSORT} ${KEYS} -k${f1}.${c1} ${INPUT_FILE} -o siks/sik2 131*1aaed33eSGabor Kovesdan if ! ${FILECMP} siks/sik1 siks/sik2 >siks/res.${f1}.${c1} 2>&1 ; then 132*1aaed33eSGabor Kovesdan echo ${LANG} ${KEYS} -k${f1}.${c1} error >> test.log 133*1aaed33eSGabor Kovesdan fi 134*1aaed33eSGabor Kovesdan ${BSDSORT} -c ${KEYS} -k${f1}.${c1} siks/sik1 135*1aaed33eSGabor Kovesdan ER=$? 136*1aaed33eSGabor Kovesdan if ! [ ${ER} -eq 0 ] ; then 137*1aaed33eSGabor Kovesdan echo ${LANG} ${KEYS} -k${f1}.${c1} -c error >> test.log 138*1aaed33eSGabor Kovesdan fi 139*1aaed33eSGabor Kovesdan rm siks/res.${f1}.${c1} 140*1aaed33eSGabor Kovesdan 141*1aaed33eSGabor Kovesdan ${BSDSORT} ${KEYS} -k${f1}.${c1}b ${INPUT_FILE} -o siks/sik1 142*1aaed33eSGabor Kovesdan ER=$? 143*1aaed33eSGabor Kovesdan if ! [ ${ER} -eq 0 ] ; then 144*1aaed33eSGabor Kovesdan echo ${LANG} ${KEYS} -k${f1}.${c1}b crash >> test.log 145*1aaed33eSGabor Kovesdan exit 146*1aaed33eSGabor Kovesdan fi 147*1aaed33eSGabor Kovesdan ${GNUSORT} ${KEYS} -k${f1}.${c1}b ${INPUT_FILE} -o siks/sik2 148*1aaed33eSGabor Kovesdan if ! ${FILECMP} siks/sik1 siks/sik2 >siks/res.${f1}.${c1} 2>&1 ; then 149*1aaed33eSGabor Kovesdan echo ${LANG} ${KEYS} -k${f1}.${c1}b error >> test.log 150*1aaed33eSGabor Kovesdan fi 151*1aaed33eSGabor Kovesdan ${BSDSORT} -c ${KEYS} -k${f1}.${c1}b siks/sik1 152*1aaed33eSGabor Kovesdan ER=$? 153*1aaed33eSGabor Kovesdan if ! [ ${ER} -eq 0 ] ; then 154*1aaed33eSGabor Kovesdan echo ${LANG} ${KEYS} -k${f1}.${c1}b -c error >> test.log 155*1aaed33eSGabor Kovesdan fi 156*1aaed33eSGabor Kovesdan rm siks/res.${f1}.${c1} 157*1aaed33eSGabor Kovesdan 158*1aaed33eSGabor Kovesdan ${BSDSORT} ${KEYS} -t " " -k${f1}.${c1} ${INPUT_FILE} -o siks/sik1 159*1aaed33eSGabor Kovesdan ER=$? 160*1aaed33eSGabor Kovesdan if ! [ ${ER} -eq 0 ] ; then 161*1aaed33eSGabor Kovesdan echo ${LANG} ${KEYS} -t -k${f1}.${c1} crash >> test.log 162*1aaed33eSGabor Kovesdan exit 163*1aaed33eSGabor Kovesdan fi 164*1aaed33eSGabor Kovesdan ${GNUSORT} ${KEYS} -t " " -k${f1}.${c1} ${INPUT_FILE} -o siks/sik2 165*1aaed33eSGabor Kovesdan if ! ${FILECMP} siks/sik1 siks/sik2 >siks/res.${f1}.${c1} 2>&1 ; then 166*1aaed33eSGabor Kovesdan echo ${LANG} ${KEYS} -k${f1}.${c1} error -t " " >> test.log 167*1aaed33eSGabor Kovesdan fi 168*1aaed33eSGabor Kovesdan ${BSDSORT} -c -t " " ${KEYS} -k${f1}.${c1} siks/sik1 169*1aaed33eSGabor Kovesdan ER=$? 170*1aaed33eSGabor Kovesdan if ! [ ${ER} -eq 0 ] ; then 171*1aaed33eSGabor Kovesdan echo ${LANG} ${KEYS} -k${f1}.${c1} -t " " -c error >> test.log 172*1aaed33eSGabor Kovesdan fi 173*1aaed33eSGabor Kovesdan rm siks/res.${f1}.${c1} 174*1aaed33eSGabor Kovesdan 175*1aaed33eSGabor Kovesdan ${BSDSORT} ${KEYS} -t " " -k${f1}.${c1}n ${INPUT_FILE} -o siks/sik1 176*1aaed33eSGabor Kovesdan ER=$? 177*1aaed33eSGabor Kovesdan if ! [ ${ER} -eq 0 ] ; then 178*1aaed33eSGabor Kovesdan echo ${LANG} ${KEYS} -k${f1}.${c1}n crash >> test.log 179*1aaed33eSGabor Kovesdan exit 180*1aaed33eSGabor Kovesdan fi 181*1aaed33eSGabor Kovesdan ${GNUSORT} ${KEYS} -t " " -k${f1}.${c1}n ${INPUT_FILE} -o siks/sik2 182*1aaed33eSGabor Kovesdan if ! ${FILECMP} siks/sik1 siks/sik2 >siks/res.${f1}.${c1} 2>&1 ; then 183*1aaed33eSGabor Kovesdan echo ${LANG} ${KEYS} -k${f1}.${c1} error -t " " n >> test.log 184*1aaed33eSGabor Kovesdan fi 185*1aaed33eSGabor Kovesdan ${BSDSORT} -c -t " " ${KEYS} -k${f1}.${c1}n siks/sik1 186*1aaed33eSGabor Kovesdan ER=$? 187*1aaed33eSGabor Kovesdan if ! [ ${ER} -eq 0 ] ; then 188*1aaed33eSGabor Kovesdan echo ${LANG} ${KEYS} -k${f1}.${c1} -c -t " " n error >> test.log 189*1aaed33eSGabor Kovesdan fi 190*1aaed33eSGabor Kovesdan rm siks/res.${f1}.${c1} 191*1aaed33eSGabor Kovesdan 192*1aaed33eSGabor Kovesdan ${BSDSORT} ${KEYS} -t "|" -k${f1}.${c1} ${INPUT_FILE} -o siks/sik1 193*1aaed33eSGabor Kovesdan ER=$? 194*1aaed33eSGabor Kovesdan if ! [ ${ER} -eq 0 ] ; then 195*1aaed33eSGabor Kovesdan echo ${LANG} ${KEYS} -t "|" -k${f1}.${c1} crash >> test.log 196*1aaed33eSGabor Kovesdan exit 197*1aaed33eSGabor Kovesdan fi 198*1aaed33eSGabor Kovesdan ${GNUSORT} ${KEYS} -t "|" -k${f1}.${c1} ${INPUT_FILE} -o siks/sik2 199*1aaed33eSGabor Kovesdan if ! ${FILECMP} siks/sik1 siks/sik2 >siks/res.${f1}.${c1} 2>&1 ; then 200*1aaed33eSGabor Kovesdan echo ${LANG} ${KEYS} -k${f1}.${c1} error -t "|" >> test.log 201*1aaed33eSGabor Kovesdan fi 202*1aaed33eSGabor Kovesdan ${BSDSORT} -c -t "|" ${KEYS} -k${f1}.${c1} siks/sik1 203*1aaed33eSGabor Kovesdan ER=$? 204*1aaed33eSGabor Kovesdan if ! [ ${ER} -eq 0 ] ; then 205*1aaed33eSGabor Kovesdan echo ${LANG} ${KEYS} -k${f1}.${c1} -c -t "|" error >> test.log 206*1aaed33eSGabor Kovesdan fi 207*1aaed33eSGabor Kovesdan rm siks/res.${f1}.${c1} 208*1aaed33eSGabor Kovesdan 209*1aaed33eSGabor Kovesdan for f2 in 1 2 3 4 5 6 7 8 9 10 210*1aaed33eSGabor Kovesdan do 211*1aaed33eSGabor Kovesdan for c2 in 0 1 2 3 4 5 10 15 20 25 30 212*1aaed33eSGabor Kovesdan do 213*1aaed33eSGabor Kovesdan echo ${LANG} ${KEYS} ${f1} ${c1} ${f2} ${c2} 214*1aaed33eSGabor Kovesdan 215*1aaed33eSGabor Kovesdan ${BSDSORT} ${KEYS} +${f1}.${c1} -${f2}.${c2} ${INPUT_FILE} -o siks/sik1 216*1aaed33eSGabor Kovesdan ER=$? 217*1aaed33eSGabor Kovesdan if ! [ ${ER} -eq 0 ] ; then 218*1aaed33eSGabor Kovesdan echo ${LANG} ${KEYS} +${f1}.${c1} -${f2}.${c2} crash >> test.log 219*1aaed33eSGabor Kovesdan exit 220*1aaed33eSGabor Kovesdan fi 221*1aaed33eSGabor Kovesdan ${GNUSORT} ${KEYS} +${f1}.${c1} -${f2}.${c2} ${INPUT_FILE} -o siks/sik2 222*1aaed33eSGabor Kovesdan if ! ${FILECMP} siks/sik1 siks/sik2 >siks/res.${f1}.${c1}.${f2}.${c2} 2>&1 ; then 223*1aaed33eSGabor Kovesdan echo ${LANG} ${KEYS} +${f1}.${c1} -${f2}.${c2} error +- >> test.log 224*1aaed33eSGabor Kovesdan fi 225*1aaed33eSGabor Kovesdan ${BSDSORT} -c ${KEYS} +${f1}.${c1} -${f2}.${c2} siks/sik1 226*1aaed33eSGabor Kovesdan ER=$? 227*1aaed33eSGabor Kovesdan if ! [ ${ER} -eq 0 ] ; then 228*1aaed33eSGabor Kovesdan echo ${LANG} ${KEYS} +${f1}.${c1} -${f2}.${c2} -c error +- >> test.log 229*1aaed33eSGabor Kovesdan fi 230*1aaed33eSGabor Kovesdan rm siks/res.${f1}.${c1}.${f2}.${c2} 231*1aaed33eSGabor Kovesdan 232*1aaed33eSGabor Kovesdan ${BSDSORT} ${KEYS} -k${f1}.${c1},${f2}.${c2} ${INPUT_FILE} -o siks/sik1 233*1aaed33eSGabor Kovesdan ER=$? 234*1aaed33eSGabor Kovesdan if ! [ ${ER} -eq 0 ] ; then 235*1aaed33eSGabor Kovesdan echo ${LANG} ${KEYS} -k${f1}.${c1},${f2}.${c2} crash >> test.log 236*1aaed33eSGabor Kovesdan exit 237*1aaed33eSGabor Kovesdan fi 238*1aaed33eSGabor Kovesdan ${GNUSORT} ${KEYS} -k${f1}.${c1},${f2}.${c2} ${INPUT_FILE} -o siks/sik2 239*1aaed33eSGabor Kovesdan if ! ${FILECMP} siks/sik1 siks/sik2 >siks/res.${f1}.${c1}.${f2}.${c2} 2>&1 ; then 240*1aaed33eSGabor Kovesdan echo ${LANG} ${KEYS} -k${f1}.${c1}.${f2}.${c2} error >> test.log 241*1aaed33eSGabor Kovesdan fi 242*1aaed33eSGabor Kovesdan ${BSDSORT} -c ${KEYS} -k${f1}.${c1},${f2}.${c2} siks/sik1 243*1aaed33eSGabor Kovesdan ER=$? 244*1aaed33eSGabor Kovesdan if ! [ ${ER} -eq 0 ] ; then 245*1aaed33eSGabor Kovesdan echo ${LANG} ${KEYS} -k${f1}.${c1},${f2}.${c2} -c error >> test.log 246*1aaed33eSGabor Kovesdan fi 247*1aaed33eSGabor Kovesdan rm siks/res.${f1}.${c1}.${f2}.${c2} 248*1aaed33eSGabor Kovesdan 249*1aaed33eSGabor Kovesdan ${BSDSORT} ${KEYS} -k${f1}.${c1}b,${f2}.${c2} ${INPUT_FILE} -o siks/sik1 250*1aaed33eSGabor Kovesdan ER=$? 251*1aaed33eSGabor Kovesdan if ! [ ${ER} -eq 0 ] ; then 252*1aaed33eSGabor Kovesdan echo ${LANG} ${KEYS} -k${f1}.${c1}b,${f2}.${c2} crash >> test.log 253*1aaed33eSGabor Kovesdan exit 254*1aaed33eSGabor Kovesdan fi 255*1aaed33eSGabor Kovesdan ${GNUSORT} ${KEYS} -k${f1}.${c1}b,${f2}.${c2} ${INPUT_FILE} -o siks/sik2 256*1aaed33eSGabor Kovesdan if ! ${FILECMP} siks/sik1 siks/sik2 >siks/res.${f1}.${c1}.${f2}.${c2} 2>&1 ; then 257*1aaed33eSGabor Kovesdan echo ${LANG} ${KEYS} -k${f1}.${c1}.b.${f2}.${c2} error >> test.log 258*1aaed33eSGabor Kovesdan fi 259*1aaed33eSGabor Kovesdan ${BSDSORT} -c ${KEYS} -k${f1}.${c1}b,${f2}.${c2} siks/sik1 260*1aaed33eSGabor Kovesdan ER=$? 261*1aaed33eSGabor Kovesdan if ! [ ${ER} -eq 0 ] ; then 262*1aaed33eSGabor Kovesdan echo ${LANG} ${KEYS} -k${f1}.${c1}b,${f2}.${c2} -c error >> test.log 263*1aaed33eSGabor Kovesdan fi 264*1aaed33eSGabor Kovesdan rm siks/res.${f1}.${c1}.${f2}.${c2} 265*1aaed33eSGabor Kovesdan 266*1aaed33eSGabor Kovesdan ${BSDSORT} ${KEYS} -t " " -k${f1}.${c1},${f2}.${c2} ${INPUT_FILE} -o siks/sik1 267*1aaed33eSGabor Kovesdan ER=$? 268*1aaed33eSGabor Kovesdan if ! [ ${ER} -eq 0 ] ; then 269*1aaed33eSGabor Kovesdan echo ${LANG} ${KEYS} -t " " -k${f1}.${c1},${f2}.${c2} crash >> test.log 270*1aaed33eSGabor Kovesdan exit 271*1aaed33eSGabor Kovesdan fi 272*1aaed33eSGabor Kovesdan ${GNUSORT} ${KEYS} -t " " -k${f1}.${c1},${f2}.${c2} ${INPUT_FILE} -o siks/sik2 273*1aaed33eSGabor Kovesdan if ! ${FILECMP} siks/sik1 siks/sik2 >siks/res.${f1}.${c1}.${f2}.${c2} 2>&1 ; then 274*1aaed33eSGabor Kovesdan echo ${LANG} ${KEYS} -k${f1}.${c1}.${f2}.${c2} error -t " " >> test.log 275*1aaed33eSGabor Kovesdan fi 276*1aaed33eSGabor Kovesdan ${BSDSORT} -c -t " " ${KEYS} -k${f1}.${c1},${f2}.${c2} siks/sik1 277*1aaed33eSGabor Kovesdan ER=$? 278*1aaed33eSGabor Kovesdan if ! [ ${ER} -eq 0 ] ; then 279*1aaed33eSGabor Kovesdan echo ${LANG} ${KEYS} -k${f1}.${c1},${f2}.${c2} -c -t " " error >> test.log 280*1aaed33eSGabor Kovesdan fi 281*1aaed33eSGabor Kovesdan rm siks/res.${f1}.${c1}.${f2}.${c2} 282*1aaed33eSGabor Kovesdan 283*1aaed33eSGabor Kovesdan ${BSDSORT} ${KEYS} -t " " -k${f1}.${c1}n,${f2}.${c2} ${INPUT_FILE} -o siks/sik1 284*1aaed33eSGabor Kovesdan ER=$? 285*1aaed33eSGabor Kovesdan if ! [ ${ER} -eq 0 ] ; then 286*1aaed33eSGabor Kovesdan echo ${LANG} ${KEYS} -t " " -k${f1}.${c1}n,${f2}.${c2} crash >> test.log 287*1aaed33eSGabor Kovesdan exit 288*1aaed33eSGabor Kovesdan fi 289*1aaed33eSGabor Kovesdan ${GNUSORT} ${KEYS} -t " " -k${f1}.${c1}n,${f2}.${c2} ${INPUT_FILE} -o siks/sik2 290*1aaed33eSGabor Kovesdan if ! ${FILECMP} siks/sik1 siks/sik2 >siks/res.${f1}.${c1}.${f2}.${c2} 2>&1 ; then 291*1aaed33eSGabor Kovesdan echo ${LANG} ${KEYS} -t " " -k${f1}.${c1}.${f2}.${c2} error n >> test.log 292*1aaed33eSGabor Kovesdan fi 293*1aaed33eSGabor Kovesdan ${BSDSORT} -c -t " " ${KEYS} -k${f1}.${c1}n,${f2}.${c2} siks/sik1 294*1aaed33eSGabor Kovesdan ER=$? 295*1aaed33eSGabor Kovesdan if ! [ ${ER} -eq 0 ] ; then 296*1aaed33eSGabor Kovesdan echo ${LANG} ${KEYS} -k${f1}.${c1},${f2}.${c2} -c -t " " n error >> test.log 297*1aaed33eSGabor Kovesdan fi 298*1aaed33eSGabor Kovesdan rm siks/res.${f1}.${c1}.${f2}.${c2} 299*1aaed33eSGabor Kovesdan 300*1aaed33eSGabor Kovesdan ${BSDSORT} ${KEYS} -t '\0' -k${f1}.${c1}n,${f2}.${c2} ${INPUT_FILE} -o siks/sik1 301*1aaed33eSGabor Kovesdan ER=$? 302*1aaed33eSGabor Kovesdan if ! [ ${ER} -eq 0 ] ; then 303*1aaed33eSGabor Kovesdan echo ${LANG} ${KEYS} -t '\0' -k${f1}.${c1}n,${f2}.${c2} crash >> test.log 304*1aaed33eSGabor Kovesdan exit 305*1aaed33eSGabor Kovesdan fi 306*1aaed33eSGabor Kovesdan ${GNUSORT} ${KEYS} -t '\0' -k${f1}.${c1}n,${f2}.${c2} ${INPUT_FILE} -o siks/sik2 307*1aaed33eSGabor Kovesdan if ! ${FILECMP} siks/sik1 siks/sik2 >siks/res.${f1}.${c1}.${f2}.${c2} 2>&1 ; then 308*1aaed33eSGabor Kovesdan echo ${LANG} ${KEYS} -k${f1}.${c1}.${f2}.${c2} error -t '\0' n >> test.log 309*1aaed33eSGabor Kovesdan fi 310*1aaed33eSGabor Kovesdan ${BSDSORT} -c -t '\0' ${KEYS} -k${f1}.${c1}n,${f2}.${c2} siks/sik1 311*1aaed33eSGabor Kovesdan ER=$? 312*1aaed33eSGabor Kovesdan if ! [ ${ER} -eq 0 ] ; then 313*1aaed33eSGabor Kovesdan echo ${LANG} ${KEYS} -k${f1}.${c1},${f2}.${c2} -c -t '\0' n error >> test.log 314*1aaed33eSGabor Kovesdan fi 315*1aaed33eSGabor Kovesdan rm siks/res.${f1}.${c1}.${f2}.${c2} 316*1aaed33eSGabor Kovesdan 317*1aaed33eSGabor Kovesdan ${BSDSORT} ${KEYS} -t "|" -k${f1}.${c1},${f2}.${c2} ${INPUT_FILE} -o siks/sik1 318*1aaed33eSGabor Kovesdan ER=$? 319*1aaed33eSGabor Kovesdan if ! [ ${ER} -eq 0 ] ; then 320*1aaed33eSGabor Kovesdan echo ${LANG} ${KEYS} -t "|" -k${f1}.${c1},${f2}.${c2} crash >> test.log 321*1aaed33eSGabor Kovesdan exit 322*1aaed33eSGabor Kovesdan fi 323*1aaed33eSGabor Kovesdan ${GNUSORT} ${KEYS} -t "|" -k${f1}.${c1},${f2}.${c2} ${INPUT_FILE} -o siks/sik2 324*1aaed33eSGabor Kovesdan if ! ${FILECMP} siks/sik1 siks/sik2 >siks/res.${f1}.${c1}.${f2}.${c2} 2>&1 ; then 325*1aaed33eSGabor Kovesdan echo ${LANG} ${KEYS} -k${f1}.${c1}.${f2}.${c2} error -t "|" >> test.log 326*1aaed33eSGabor Kovesdan fi 327*1aaed33eSGabor Kovesdan ${BSDSORT} -c -t "|" ${KEYS} -k${f1}.${c1},${f2}.${c2} siks/sik1 328*1aaed33eSGabor Kovesdan ER=$? 329*1aaed33eSGabor Kovesdan if ! [ ${ER} -eq 0 ] ; then 330*1aaed33eSGabor Kovesdan echo ${LANG} ${KEYS} -k${f1}.${c1},${f2}.${c2} -c -t "|" error >> test.log 331*1aaed33eSGabor Kovesdan fi 332*1aaed33eSGabor Kovesdan rm siks/res.${f1}.${c1}.${f2}.${c2} 333*1aaed33eSGabor Kovesdan 334*1aaed33eSGabor Kovesdan ${BSDSORT} ${KEYS} -t "|" -k${f1}.${c1},${f2}.${c2} -k${f2}.${c1},${f1}.${c2} ${INPUT_FILE} -o siks/sik1 335*1aaed33eSGabor Kovesdan ER=$? 336*1aaed33eSGabor Kovesdan if ! [ ${ER} -eq 0 ] ; then 337*1aaed33eSGabor Kovesdan echo ${LANG} ${KEYS} -t "|" -k${f1}.${c1},${f2}.${c2} -k${f2}.${c1},${f1}.${c2} crash >> test.log 338*1aaed33eSGabor Kovesdan exit 339*1aaed33eSGabor Kovesdan fi 340*1aaed33eSGabor Kovesdan ${GNUSORT} ${KEYS} -t "|" -k${f1}.${c1},${f2}.${c2} -k${f2}.${c1},${f1}.${c2} ${INPUT_FILE} -o siks/sik2 341*1aaed33eSGabor Kovesdan if ! ${FILECMP} siks/sik1 siks/sik2 >siks/res.${f1}.${c1}.${f2}.${c2} 2>&1 ; then 342*1aaed33eSGabor Kovesdan echo ${LANG} ${KEYS} -k${f1}.${c1}.${f2}.${c2} error -t "|" 2k >> test.log 343*1aaed33eSGabor Kovesdan fi 344*1aaed33eSGabor Kovesdan ${BSDSORT} -c -t "|" ${KEYS} -k${f1}.${c1},${f2}.${c2} -k${f2}.${c1},${f1}.${c2} siks/sik1 345*1aaed33eSGabor Kovesdan ER=$? 346*1aaed33eSGabor Kovesdan if ! [ ${ER} -eq 0 ] ; then 347*1aaed33eSGabor Kovesdan echo ${LANG} ${KEYS} -k${f1}.${c1},${f2}.${c2} -c -t "|" 2k error >> test.log 348*1aaed33eSGabor Kovesdan fi 349*1aaed33eSGabor Kovesdan rm siks/res.${f1}.${c1}.${f2}.${c2} 350*1aaed33eSGabor Kovesdan 351*1aaed33eSGabor Kovesdan ${BSDSORT} ${KEYS} -k${f1}.${c1}b,${f2}.${c2} -k${f2}.${c1},${f1}.${c2} ${INPUT_FILE} -o siks/sik1 352*1aaed33eSGabor Kovesdan ER=$? 353*1aaed33eSGabor Kovesdan if ! [ ${ER} -eq 0 ] ; then 354*1aaed33eSGabor Kovesdan echo ${LANG} ${KEYS} -k${f1}.${c1}b,${f2}.${c2} -k${f2}.${c1},${f1}.${c2} crash >> test.log 355*1aaed33eSGabor Kovesdan exit 356*1aaed33eSGabor Kovesdan fi 357*1aaed33eSGabor Kovesdan ${GNUSORT} ${KEYS} -k${f1}.${c1}b,${f2}.${c2} -k${f2}.${c1},${f1}.${c2} ${INPUT_FILE} -o siks/sik2 358*1aaed33eSGabor Kovesdan if ! ${FILECMP} siks/sik1 siks/sik2 >siks/res.${f1}.${c1}.${f2}.${c2} 2>&1 ; then 359*1aaed33eSGabor Kovesdan echo ${LANG} ${KEYS} -k${f1}.${c1}.b.${f2}.${c2} error 2k >> test.log 360*1aaed33eSGabor Kovesdan fi 361*1aaed33eSGabor Kovesdan ${BSDSORT} -c ${KEYS} -k${f1}.${c1}b,${f2}.${c2} -k${f2}.${c1},${f1}.${c2} siks/sik1 362*1aaed33eSGabor Kovesdan ER=$? 363*1aaed33eSGabor Kovesdan if ! [ ${ER} -eq 0 ] ; then 364*1aaed33eSGabor Kovesdan echo ${LANG} ${KEYS} -k${f1}.${c1}b,${f2}.${c2} -c 2k error >> test.log 365*1aaed33eSGabor Kovesdan fi 366*1aaed33eSGabor Kovesdan rm siks/res.${f1}.${c1}.${f2}.${c2} 367*1aaed33eSGabor Kovesdan 368*1aaed33eSGabor Kovesdan done 369*1aaed33eSGabor Kovesdan done 370*1aaed33eSGabor Kovesdan done 371*1aaed33eSGabor Kovesdan done 372*1aaed33eSGabor Kovesdan done 373*1aaed33eSGabor Kovesdandone 374*1aaed33eSGabor Kovesdan 375