http://blog.csdn.net/ly21st http://ly21st.blog.chinaunix.net
发布时间:2011-10-14 10:56:23
#! /bin/bash# crond Start/Stop the cron clock daemon.## chkconfig: 2345 90 60# description: cron is a standard UNIX program that runs # user-specified programs at periodic scheduled times.# config: /etc/crontab# pidfile: /var/run/crond.pid# Source function library.. /etc/init.d/functio.........【阅读全文】
发布时间:2011-10-14 10:45:45
#!/bin/bash# Scriptname: wholenum# Purpose:The expr command tests that the user enters an # integer -- bash shell echo "Enter an integer."read numberif expr "$number" + 0 >& /dev/null then :else echo "You did not enter an integer value." exit 1fi.........【阅读全文】
发布时间:2011-10-14 10:25:20
#!/bin/bash# Scriptname: todebugname="Joe Shmoe"if [[ $name == "Joe Blow" ]]then printf "Hello $name\n"fideclare -i num=1while (( num < 5 ))do let num+=1doneprintf "The total is %d\n", $num......【阅读全文】
发布时间:2011-10-14 10:16:14
#!/bin/bashfunction trapper () { echo "In trapper" trap 'echo "Caught in a trap!"' INT # Once set, this trap affects the entire script. Anytime # ^C is entered, the script will ignore it.}while :do echo "In the main script" trapper echo "Still in ma.........【阅读全文】
发布时间:2011-10-14 10:09:59
#!/bin/bash# Scriptname: mainprog# This is the main script that will call the function, addon# datafile=$HOME/bourne/datafile datafile=./datafile source dbfunctions # The file is loaded into memory if [ ! -e $datafile ] then echo "$(basename $datafile) does not ex.........【阅读全文】