http://blog.csdn.net/ly21st http://ly21st.blog.chinaunix.net
发布时间:2011-10-12 21:12:42
#!/bin/sh# Program opts2# Using getopts -- Second try --while getopts xy options 2> /dev/nulldo case $options in x) echo "you entered -x as an option";; y) echo "you entered -y as an option";; \?) echo "Only -x and -y are valid options" 1>&2;; esacdone.........【阅读全文】
发布时间:2011-10-12 20:25:45
#!/bin/sh# Scriptname: do_incrementincrement () { sum=`expr $1 + 1` return $sum # Return the value of sum to the script.} echo -n "The sum is "increment 5 # Call function increment; pass 5 as a &nb.........【阅读全文】