Closed ryanyakich closed 10 years ago
It looks like the ERE flag for the Mac version of sed
is -E
per the manpage.
-E Interpret regular expressions as extended (modern) regular expressions rather than basic regular expressions (BRE's). The re_format(7) manual page fully describes both formats.
Can you verify this works?
dbs=$(echo $dbs | sed -E s/Database//g -e s/information_schema//g -e s/mysql//g)
Also note that I stated the script only works for GNU. I'll be happy to start hacking in support for other platforms though.
The script worked great on my mac as well as on Dreamhost server after I made this change as well as the change to the $HOST check.
Ok, I've got a patch for sed
on OSX up on master, let me know if it works for you.
Worked great. Thank you.
I had a problem on mac using the "-r" flag on line 240
240-yours: dbs=$(echo $dbs | sed -r 's/(Database |information_schema |performance_schema )//g')
240-mine: dbs=$(echo $dbs | sed -e s/Database//g -e s/information_schema//g -e s/mysql//g)