I'm trying to write a bash function in .bash_profile
with a parameter that will run a script on my sql
and test it, but I get the following error when trying to invoke it:
$ sqltest() ~/Downloads/hw5-2.sql
-bash: syntax error near unexpected token `~/Downloads/hw5-2.sql`
The parameter is the file path. What I have right now (also have tried "$1"
w/o quotes):
sqltest() { java -cp h2-1.4.200.jar org.h2.tools.RunScript -checkResults -url jdbc:h2:mem:test -script "$1" -continueOnError ; }