#!/bin/bash while read -p 'Guess:' guess ; do sleep 4 if [ "$guess" = $magicnum ] ; then echo 'Right!' exit fi echo 'Wrong!' done