http://blog.csdn.net/ly21st http://ly21st.blog.chinaunix.net
发布时间:2011-10-13 22:20:56
#!/bin/bash# Scriptname: forloopfor pal in Tom Dick Harry Joedo echo "Hi $pal"doneecho "Out of loop"......【阅读全文】
发布时间:2011-10-13 22:12:20
#!/bin/bash# Scriptname: dater# Purpose: set positional parameters with the set command # and shift through the parameters.set $(date)while (( $# > 0 )) # or [ $# -gt 0 ] Old styledo echo $1 shift done......【阅读全文】
发布时间:2011-10-13 21:24:02
#!/bin/bash# Scriptname: tellme# Using the old-style test commandecho -n "How old are you? "read ageif [ $age -lt 0 -o $age -gt 120 ]then echo "Welcome to our planet! " exit 1 fiif [ $age -ge 0 -a $age -le 12 ] then echo "A child is a gar.........【阅读全文】
发布时间:2011-10-13 21:18:15
#!/bin/bash# Using the old style test command# filename: perm_checkfile=./testingif [ -d $file ] then echo "$file is a directory" elif [ -f $file ]then if [ -r $file -a -w $file -a -x $file ] then &nb.........【阅读全文】