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'
cat -
#!/bin/bash # determine the number of unique side values case $(cat - | uniq -u | wc -l) in 0) echo "EQUILATERAL";; 1) echo "ISOSCELES";; 3) echo "SCALENE" esac
More on Conditionals
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 ofcat -
to read the STDIN. I liked your way better