## a complex text in ksh

## a complex text in ksh

(OP)

hello,

could someone please tell me, why the bracket } appears on the output?

#### CODE

$ ( echo A B C D ::;sed 's/\(.\{1\}\)/\1 /g' vvvv|sort|while read A B C D;do printf "$A $B $C $D :: "; [ $A -eq 1 -a $B -eq 1 -a $C -eq 1 -a $D -eq 1 ] && echo "errors: A and B and C and D" || { [ $A -eq 1 -a $B -eq 0 -a $C -eq 0 -a $D -eq 0 ] && echo "errors: A" || { [ $A -eq 1 -a $B -eq 1 -a $C -eq 0 -a $D -eq 0 ] && echo "errors: A and B" || { [ $A -eq 1 -a $B -eq 1 -a $C -eq 1 -a $D -eq 0 ] && echo "errors: A and B and C" || { [ $A -eq 1 -a $B -eq 1 -a $C -eq 0 -a $D -eq 1 ] && echo "errors: A and B and D" || { [ $A -eq 1 -a $B -eq 0 -a $C -eq 1 -a $D -eq 1 ] && echo "errors: A and C and D" || { [ $A -eq 1 -a $B -eq 0 -a $C -eq 0 -a $D -eq 1 ] && echo "errors: A and D" || { [ $A -eq 1 -a $B -eq 0 -a $C -eq 1 -a $D -eq 0 ] && echo "errors: A and C" || { [ $A -eq 0 -a $B -eq 1 -a $C -eq 0 -a $D -eq 0 ] && echo "errors: B" || { [ $A -eq 0 -a $B -eq 1 -a $C -eq 1 -a $D -eq 0 ] && echo "errors: B and C" || { [ $A -eq 0 -a $B -eq 1 -a $C -eq 1 -a $D -eq 1 ] && echo "errors: B and C and D" || { [ $A -eq 0 -a $B -eq 1 -a $C -eq 0 -a $D -eq 1 ] && echo "errors: B and D" || { [ $A -eq 0 -a $B -eq 0 -a $C -eq 1 -a $D -eq 0 ] && echo "errors: C" || { [ $A -eq 0 -a $B -eq 0 -a $C -eq 1 -a $D -eq 1 ] && echo "errors: C and D" || { [ $A -eq 0 -a $B -eq 0 -a $C -eq 0 -a $D -eq 1 ] && echo "errors: D" || echo "errors: none" }; } } } } } } } } } } } } } }; unset A B C D;done ) A B C D :: 0 0 0 0 :: errors: none } 0 0 0 1 :: errors: D 0 0 1 0 :: errors: C 0 0 1 1 :: errors: C and D 0 1 0 0 :: errors: B 0 1 0 1 :: errors: B and D 0 1 1 0 :: errors: B and C 0 1 1 1 :: errors: B and C and D 1 0 0 0 :: errors: A 1 0 0 1 :: errors: A and D 1 0 1 0 :: errors: A and C 1 0 1 1 :: errors: A and C and D 1 1 0 0 :: errors: A and B 1 1 0 1 :: errors: A and B and D 1 1 1 0 :: errors: A and B and C 1 1 1 1 :: errors: A and B and C and D $

the input file is:

#### CODE

0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1011 1100 1101 1110 1111

## RE: a complex text in ksh

echo "errors: none" };

with this:

echo "errors: none";

Hope This Helps, PH.

FAQ219-2884: How Do I Get Great Answers To my Tek-Tips Questions?

FAQ181-2886: How can I maximize my chances of getting an answer?

## RE: a complex text in ksh

you had 15 } for only 14 {

Hope This Helps, PH.

FAQ219-2884: How Do I Get Great Answers To my Tek-Tips Questions?

FAQ181-2886: How can I maximize my chances of getting an answer?

## RE: a complex text in ksh