Can't figure this one out, if I execute the command directly in the shell, then it executes successfully, but running from a script file I get the following error:
sqlite3: Error: too many options: "INTO"
#!/bin/bash
sql="\"INSERT INTO keys ('date','chan','key','name','desc','ser','ep','cat') VALUES('xxx','xxx','xxxx','xxxx','xxxxx.','xxx','xxx','xxxx');\""
echo $sql
sqlite3 mydb.db $sql
Any ideas on what the problem might be ?
$sqlvariable in the script:sqlite3 mydb.db "$sql"