只有注册用户登录后才能阅读该文。 阅读全文
posted @ 2011-09-20 20:05 kunkkayang 阅读(3) 评论(0) 推荐(0)
  2012年9月29日
摘要: 1 #!/bin/bash 2 # can only login in with root and root 3 # pay attention to the "-a" in the if condition, it means "and" 4 echo "Login as:" 5 read name 6 echo "Password:" 7 stty -echo # this is to hide the password input 8 read password 9 stty echo # this to r 阅读全文
posted @ 2012-09-29 14:14 kunkkayang 阅读(150) 评论(0) 推荐(0)
摘要: 1 1 #!/bin/bash 2 2 3 4 sum=0 4 5 5 6 if [ $# -eq 0 ] # if no parameter 6 7 then 7 8 echo 'Usage [number1] [number2] ...' 8 9 exit 1 9 10 fi10 11 for i in $*11 12 do 12 13 sum=`expr $sum \+ $i`13 14 shift ... 阅读全文
posted @ 2012-09-29 13:53 kunkkayang 阅读(123) 评论(0) 推荐(0)

点击右上角即可分享
微信分享提示