I have a SQLite database, stuff.db (with TABLE notes (id INTEGER PRIMARY KEY, timeStamp DATE, note TEXT);). The timeStamp is automatically triggered.
I want to populate it the quick and dirty way from the command line.
So, I have written a script named bashscript1 which goes :
sqlite3 script.db 'insert into notes (note) values ("Stuff happens.");'
But I wanted both to keep this sentence as the standard entry and if necessary, to be more precise : I would like to add variable information such as : "Foo enters the room." or "Bar makes a phone call.". The idea is to concatenate those strings and have : "Stuff happens. Foo enters the room." or "Stuff happens. Bar makes a phone call."
So I rewrote the script :
echo "Do you want to add somme text ?"
read Str1
sqlite3 script.db 'insert into notes (note) values ("Stuff happens."||\"$Str1\");'
And, of course I got an error message. How should I proceed ?
Thanks in advance
ThG