I want to check if the function mdfind returns true, and by that I mean if it finds what the user specified in a variable from a read call.
This is what I've got but it isn't working:
#!/bin/bash
clear
echo "Loading..."
sleep 2
clear
echo "Grand Theft Auto Launcher | v1.0"
echo -n "Grand Theft Auto Game Name: "
read game
if [ mdfind $game ]
then
clear
echo "$game found."
echo "Launching..."
fi