bash file to detect chrome installation I need to create a bash file that executes google chrome (if installed) with some flags and an input file. Does someone know how to detect chrome installation and path via a bash file?
This will check if Chrome is installed in the default location, then open a file at a path with arguments you have set.

CHROMEPATH="/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"
if [ -x "$CHROMEPATH" ]; then
    "$CHROMEPATH" file:///path/to/file --yourargs
fi