创建一个shell脚本来在ubuntu中从php运行sqlite命令 [英] create a shell script to run sqlite commands from php in ubuntu
本文介绍了创建一个shell脚本来在ubuntu中从php运行sqlite命令的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想在 ubuntu10.10 操作系统上使用 A SHELL SCRIPT 创建一个新的 sqlite 数据库......有任何想法吗??
i want to create a new db of sqlite using A SHELL SCRIPT on an ubuntu10.10 OS....Any ideas??
我尝试使用以下代码创建create.sh"文件...
I tried 'create.sh' file with following code...
#!/bin/bash
sqlite ex3.db
create table t1(f1 integer primary key,f2 text)
比从终端运行 ./create.sh 但它引导我sqlite> 提示...我在任何地方都看不到创建的 DB ex3 ..
than run a ./create.sh from termminal but it leads me to sqlite> prompt...I dont see created DB ex3 anywhere..
请帮忙...
推荐答案
#!/bin/bash
sqlite3 ex3.db "create table t1(f1 integer primary key,f2 text)"
我认为应该可行,不幸的是,现在无法检查.
should work I think, unfortunately, not able to check right now.
这篇关于创建一个shell脚本来在ubuntu中从php运行sqlite命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文