#!/bin/bash while echo -n \"Player\'s name?\" read name [ $name != \'ZZZ\' ] do searchresult=$(grep [$name] playername) if [ $searchresult = 0 ] the
Use -eq instead = in your if statement in your script or use -z option to check empty string.