read input file

echo "enter employee #:/c"
read employee

grep -w $employee /tmp/file.txt

when it asked me employee #, i typed employee, worked fine.

when it asked me employee #, i type ENTER, it just sit there.

if someone type in NULL or ENTER key, i want to exit out.

echo "enter employee #:/c"
read employee
if [[ ! -z $employee ]] ; then
  grep -w $employee /tmp/file.txt
fi

Try that.

that works too.

if [ -z "$employee" ] - works also.

once again, thank you much.