摘要: 第一种:#!/bin/bash service vsftpd start &> /dev/null if[ $? -eq 0 ]thenecho "ftp is start"elseservice vsftpd startfi第二种:#!/bin/bash read -p "input your f... 阅读全文
posted @ 2014-06-01 12:17 Linux.应用 阅读(12838) 评论(0) 推荐(0) 编辑
摘要: 还得我想了10分钟才明白”!=“和"-n"的用法区别,做个笔记捋一捋第一种方法:测试apache是否开启?字符串测试#!/bin/bashweb=`/usr/bin/pgrep httpd`if [ -n "$web" ]; //$web返回值是否为空then echo "httpd is ... 阅读全文
posted @ 2014-06-01 11:03 Linux.应用 阅读(356) 评论(0) 推荐(0) 编辑