Chinaunix首页 | 论坛 | 博客
  • 博客访问: 310506
  • 博文数量: 214
  • 博客积分: 4258
  • 博客等级: 上校
  • 技术积分: 2021
  • 用 户 组: 普通用户
  • 注册时间: 2010-12-02 09:16
个人简介

http://blog.csdn.net/ly21st http://ly21st.blog.chinaunix.net

文章分类

全部博文(214)

文章存档

2018年(16)

2015年(1)

2014年(2)

2012年(22)

2011年(173)

发布时间:2011-10-14 10:03:06

#!/bin/bash# Scriptname: do_squarefunction square {  local sq     # sq is local to the function  let "sq=$1 * $1"  echo "Number to be squared is $1."  echo "The result is $sq "}echo "Give me a number to square. "read numbervalue_returned=$(square $.........【阅读全文】

阅读(260) | 评论(0) | 转发(0)

发布时间:2011-10-14 09:59:44

#!/bin/bash# Scriptname: do_increment increment ()  {    local sum;     # sum is known only in this function    let "sum=$1 + 1"    return $sum    # Return the value of sum to the script} echo  -n.........【阅读全文】

阅读(277) | 评论(0) | 转发(0)

发布时间:2011-10-14 09:35:17

#!/bin/bash# Scriptname: ttype# Purpose: set the terminal type# Author: Andy AdminCOLUMNS=60LINES=1PS3="Please enter the terminal type: "select choice in wyse50 vt200 xterm sundo  case $REPLY in 1)  export TERM=$choice  echo "TERM=$choice"  b.........【阅读全文】

阅读(297) | 评论(0) | 转发(0)

发布时间: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......【阅读全文】

阅读(313) | 评论(0) | 转发(0)

发布时间:2011-10-14 09:11:34

#!/bin/bash# Scriptname: numnum=0    # Initialize numwhile (( $num < 10 ))   # or  while [ num -lt 10 ]do  echo  -n "$num " let num+=1           # Increment num,the same as (( num=num+1 )) or (( n.........【阅读全文】

阅读(204) | 评论(0) | 转发(0)
给主人留下些什么吧!~~
留言热议
请登录后留言。

登录 注册