#!/bin/bash while echo -n \"Player\'s name?\" read name [ $name != \'ZZZ\' ] do searchresult=$(grep [$name] playername) if [ $searchresult = 0 ] the
Quote the variable name:
"$searchresult"
Also, youa have other failures in the script.