![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Shell
iteye_6281
这个作者很懒,什么都没留下…
展开
-
Shell 把一个数据库中所有表的描述写到一个文件里
#!/bin/shtables=`mysql -u root -e "use i_test;show tables;"`for list in $tablesdo if [ $list == 'Tables_in_i_test' ]; then echo "Table in i_test:" >> a.txt else echo >...2008-06-27 13:53:54 · 131 阅读 · 0 评论 -
Linux Shell 中与用户交互
#!/bin/sh echo -n "Continue?(Y/N)" read ANSWER case $ANSWER in [Yy]*) echo " you input is y or Y !" ;; [Nn]*) echo " you input a "$ANSWER ;; esac echo...2008-06-27 14:38:48 · 299 阅读 · 0 评论 -
shell 写的数据库查询工具
#!/bin/shecho "********************************************************"echo " 1. Describe all table construct."echo " 2. Show a Table's content by you input table name."echo " 3. Show a Case's...2008-06-27 18:32:55 · 140 阅读 · 0 评论 -
vi 使用小技巧之 批量替换文本
vi中替换文本str1为str2%s/str1/str2/g如果想输入"."请用"\."代替2009-06-05 15:40:31 · 134 阅读 · 0 评论 -
tomcat 虚拟器内存设置
在Linux中,在tomcat启动时是指JVM的堆栈大小,只需要在startup.sh中增加一句: export JAVA_OPTS="${JAVA_OPTS} -Dcassia.home=${PWD}/../../ -Dcassia.webapp=${PWD}/../webapps/dms.war -Dfile.encoding=UTF-8 -server -Xms256m -Xmx10...原创 2009-06-10 19:10:47 · 59 阅读 · 0 评论 -
替换文本
写道方法1:sed -i 's/被替换的内容/要替换成的内容/' file方法2:sed 's/被替换的内容/要替换成的内容/g' file > file.outmv file.out file替换特殊字符时,要在特殊字符前加\,如要将agent.ini中的test替换为/database: sed -i 's/test/\/database/' agent.ini要使用变量替原...原创 2011-03-02 16:26:33 · 130 阅读 · 0 评论 -
scp command
Copying file to host:scp SourceFile user@host:directory/TargetFileCopying file from host:scp user@host:directory/SourceFile TargetFilescp -r user@host:directory/SourceFolder TargetFolder...原创 2012-10-18 10:16:26 · 130 阅读 · 0 评论 -
后台启动mongodb
linux下mongodb启动后,关闭窗口,就自动停止了。这个时候需要用命令: mongod --fork --logpath /data/logs/mongodb/mongo.log --logappend 远程登录:mongo 10.3.19.31:62167/test -utest -ptest 没有用户名和密码验证的话,直接使用:mo...原创 2014-07-02 17:07:44 · 246 阅读 · 0 评论