Files="data.eo2 data.xf3 data.go4 data.gs1" cd $HOME/work/mine/trunk/doc/06/markland/ rm -f $Files data() { cat dataNoBlanks3.csv \ | gawk -F, 'BEGIN {FS=OFS=","} {print $1,$5,$6,$7,$10,$11,$13,$14,$15,$16,$17,$18,$19,$20,$22,$23,$24}' \ | gawk -F, ' NR==1 { print $0 >"data.eo2"; print $0 >"data.xf3"; print $0 >"Data.go4"; print $0 >"data.gs1"; next } $1 == "X1" || $1 == "X4" || $1=="X5" || $1 == "X7" || $1 == "X10" || $1=="X12" {print $0 >> "data.eo2"; next} $1 == "X2" || $1 == "X3" || $1 == "X8" {print $0 >> "data.xf3"; next} $1 == "X6" || $1 == "X11" {print $0 >> "data.go4"; next} $1 == "X9" {print $0 >> "data.gs1"; next} {print "?? " $0 } ' } cdfs() { for f in $Files do gawk -F, 'NF > 15 {print}' $f | cut -d, -f 2- > $f.tmp mv $f.tmp $f blabln $f silap -w cdfs.$f $f done } data cdfs blabln ":: " silap -r cdfs.data.gs1 | malign -b ":" > todo.data.gs1 #|gn malign -d ":" > selected.data.gs1 #eo2 x1,x4,x5,x7,x10,x12 #go4 x6,x11 #gs1 x9 #xf3 x2,x3,x8 # 93 93 3008 data.xf3 # 57 57 1856 data.go4 # 20 20 672 data.gs1 # 265 265 8522 data.eo2 # 435 435 14058 total