I tried this:
a="\"Google Chrome\"" and I tried
a="'Google Chrome'" but no go. How can I accomplish? For this script here:
birthBrowser(){ local a if [ $# -eq 0 ] then a="Google Chrome" fi if [ $# -eq 1 ] then a="$1" fi if [ $# -gt 1 ] then a="$1" echo "Too many arguments" fi open -a $a } It seems to keep reading only the Chrome part and not treating "Google Chrome" as one argument.
For example open -a "Google Chrome" works in the console.
opento work correctly, then those quotes shouldn't be escaped.