#!/bin/sh
a=0;
while [ 1 ]; do
read -n 1 var;
a=$(($var+1));
if [ "$a" == "1024" ]; then
echo "Max count reached";
fi
done
