You are viewing a single comment's thread. Return to all comments →
I had a similar approach to yours to begin with, but was using sed '3 q' instead of cat - to read the STDIN. I liked your way better
sed '3 q'
# determine the number of unique side values
case $(cat - | uniq -u | wc -l) in
0) echo "EQUILATERAL";; 1) echo "ISOSCELES";; 3) echo "SCALENE"