摘要: shell脚本中>/dev/null的含义shell脚本中有段使用sqlplus的部分:sqlplus ${user_id} /dev/nullspool spool_file; desc tablespool off;exit! 在Linux/Unix中,一般在屏幕上面看到的信息是从... 阅读全文
posted @ 2014-06-14 16:15 mjorcen 阅读(650) 评论(0) 推荐(0)
摘要: 一条命令批量替换多个文件中字符串 有些时候我们可能需要批量替换一些文件中的某个字符串,那么我们该怎么做呢?一个文件一个文件的修改,或者写个脚本?能不能一条命令搞定呢?答案是肯定的,这正是sed表现的好机会啊~命令如下:sed -i "s/oldString/newString/g" `grep o... 阅读全文
posted @ 2014-06-14 16:00 mjorcen 阅读(445) 评论(0) 推荐(0)
摘要: Centos 6.4上面用Shell脚本一键安装vsftpdinstall.sh#!/bin/bashif [ `uname -m` == "x86_64" ];thenmachine=x86_64elsemachine=i686fiifrpm=$(cat /proc/version | grep ... 阅读全文
posted @ 2014-06-14 15:54 mjorcen 阅读(760) 评论(0) 推荐(0)
摘要: centos 卸载vsftpd方法在服务器上安装了vsftpd,配置出错需要卸载vsftpd。卸载vsftpd的命令如下:1 [root@localhost ~]# rpm -aq vsftpd2 vsftpd-2.0.5-16.el5_5.1 #此处是查找vsftpd的返回结果3 [root@lo... 阅读全文
posted @ 2014-06-14 12:48 mjorcen 阅读(7905) 评论(0) 推荐(0)
摘要: Centos 6.4上面用Shell脚本一键安装mysql 5.6.15#!/bin/bashif [ `uname -m` == "x86_64" ];thenmachine=x86_64elsemachine=i686fimysqlBasedir=/storage/server/mysqlmys... 阅读全文
posted @ 2014-06-14 03:33 mjorcen 阅读(2201) 评论(0) 推荐(0)
摘要: SHELL学习笔记----IF条件判断,判断条件前言: 无论什么编程语言都离不开条件判断。SHELL也不例外。if list then do something here elif list then do another thing here else do something else here... 阅读全文
posted @ 2014-06-14 00:50 mjorcen 阅读(218) 评论(0) 推荐(0)