Chinaunix首页 | 论坛 | 博客
  • 博客访问: 334135
  • 博文数量: 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:16:14

#!/bin/bashfunction trapper () {  echo "In trapper" trap 'echo "Caught in a trap!"' INT  # Once set, this trap affects the entire script. Anytime # ^C is entered, the script will ignore it.}while :do echo "In the main script" trapper  echo "Still in ma.........【阅读全文】

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

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

#!/bin/bash# Scriptname: mainprog# This is the main script that will call the function, addon# datafile=$HOME/bourne/datafile datafile=./datafile source dbfunctions    # The file is loaded into memory if [ ! -e $datafile ] then echo "$(basename $datafile) does not ex.........【阅读全文】

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

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

阅读(291) | 评论(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.........【阅读全文】

阅读(319) | 评论(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.........【阅读全文】

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

登录 注册