#!/bin/bash
#author:zhangqiang
#date:2012-02-21
testing80=`netstat -tuln | grep ":80"`
if["$testing"!=""]; then
echo "www service status:Run"
else
echo "www service status:Stop"
fi
#!/bin/bash
#检查80端口状态
#author=zhangqiang
#date=2013-02-21
PATH=/usr/lib/qt-3.3/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin
export PATH
testing=`netstat -tuln | grep ":80"`
if [ "$testing" != ""]; then
echo "www service is Run"
else
echo "www service is Stop"
fi
#!/bin/bash
#检查80端口是否开启
#check wwww service status
#author=zhangqiang
#date=2013-02-21
PATH=/usr/lib/qt-3.3/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin
export PATH
testing=`netstat -tuln | grep ":80"`
if [ "$testing" != "" ]; then
echo "www service is Run"
else
echo "www service is Stop"
fi
#!/bin/bash
#根据日期创建文件夹
#Create there Directory By date
read -p "please input filename what you want:" filename
#Get date
jintian=`date --date='today' +%Y%m%d`
zuotian=`date --date='1 days ago' +%Y%m%d`
qiantian=`date --date='2 days ago' +%Y%m%d`
#create filename
file1="$filename""$jintian"
file2="$filename""$zuotian"
file3="$filename""$qiantian"
#create directory
mkdir "$file1"
mkdir "$file2"
mkdir "$file3"
echo "Direcotry Create Success...."
exit 0
#!/bin/bash
#读取两个输入,并拼接显示出来
PATH=/usr/lib/qt-3.3/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin
read -p "Please input you first name:" firstname
read -p "please input you last name" lastname
echo -e "\nyou full name is $firstname $lastname"