摘要: 今天写了个linux脚本,判断某进程是否已经运行,代码如下:#!/bin/shpid=$(ps aux | grep "java -jar hello.jar" | grep -v "grep" | sed -n '1P' | awk '{print $2}' )if [ -z $pid ] ; then echo "there isn't this process!" elseecho $pid... 阅读全文
posted @ 2010-11-27 15:10 朗笑江湖 阅读(22417) 评论(0) 推荐(2) 编辑