How can I write bash script to force pre-written sql quaries and inserts into my sqlite3 DB? I am currently having to run my page in a browser and then the sqlite4 DB gets edited by php commands then I have to go back into sqlite3 and manually set everything back to a known state. I would like to be able to run a simple script that would re-set my DB back to original test state. I know how to handle permissions and command paths, I just need the bash to sqlite knowledge. Thanks.

Read the sqlite3 man page for details on how to use the command-line interface. You can use that in your bash scripts. You should not need run it via php.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.