http://blog.csdn.net/ly21st http://ly21st.blog.chinaunix.net
发布时间:2011-10-14 09:14:21
#!/bin/bash# Scriptname: permxfor file # Empty wordlistdoif [ -f $file -a ! -x $file ] or if [[ -f $file && ! -x $file ]]then chmod +x $file echo $file now has execute permissionfidone......【阅读全文】
发布时间: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.........【阅读全文】