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