while read -n1 _ read -n1 b [ $b = read -n1 ]&&echo $b||read -n2 read _ end