#!/bin/bash # This script uses if / elif / else flow structure to compare # three numbers, and indicate if 1 & 2 & 3 match, 1&2 match # 2&3 match, or no match echo -n "Enter first number:" read num1 echo -n "Enter second number:" read num2 echo -n "Enter third number:" read num3 # -a represents the expression "and" if [ "$num1" = "$num2" -a "$num2" = "$num3" ] then echo "All numbers match" elif [ "$num1" = "$num2" ] then echo "First & Second numbers match" elif [ "$num2" = "$num3" ] then echo "Second & Third numbers match" else echo "None of the numbers match" fi