linux
冰叶纷飞
这个作者很懒,什么都没留下…
展开
-
grep与正则表达式
正则表达式只是字符串的一种描述,只有和支持正则表达式的工具相结合才能进行字符串处理。本文以grep为例来讲解正则表达式。 grep命令 功能:输入文件的每一行中查找字符串。 基本用法: grep [-acinv] [--color=auto] [-A n] [-B n] '搜寻字符串' 文件名 参数说明: -a:将二进制文档以文本方式处理 -c:显示匹配次数 -i:忽略大小转载 2015-07-07 14:18:44 · 294 阅读 · 0 评论 -
tomcat 重启命令
新建restart.sh文件 文件内容如下: #!/bin/bash tomcat_path=$(pwd) echo $tomcat_path pid=`ps -ef|grep $tomcat_path |grep -v grep|awk '{print $2}'` if [[ ! $pid ]]; then echo $"$tomcat_path service is stoped原创 2016-11-17 18:47:29 · 2248 阅读 · 0 评论