Chinaunix首页 | 论坛 | 博客
  • 博客访问: 307461
  • 博文数量: 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-12 23:22:02

#!/bin/csh -f# This script is called databasewhile (1) echo "Select a menu item" cat << EOF 1) Append 2) Delete 3) Update 4) ExitEOF set choice = $< switch ($choice) case 1:   echo "Appending"   break &nb.........【阅读全文】

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

发布时间:2011-10-12 23:14:32

# This script is called colorsecho -n "Which color do you like? "set color = $<switch ("$color")case bl*: echo I feel $color echo The sky is $color breaksw case red:          # Is is red or is it yellow?    &nb.........【阅读全文】

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

发布时间:2011-10-12 23:10:59

#!/bin/csh -f# This script is called baseballecho -n "What baseball hero died in August 1995? "set answer = $<while ("$answer" !~ [Mm]*)   echo "Wrong\! Try again."  set answer = $<  if ( "$answer" =~  [Mm]* ) break endecho "You are a scholar.".........【阅读全文】

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

发布时间:2011-10-12 23:05:40

#!/bin/tcsh -f# Scriptname: filetest2foreach file (`ls`)   if ( -rwf $file ) then      echo "${file}: readable/writeable/plain file"   endifend......【阅读全文】

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

发布时间:2011-10-12 21:22:14

#!/bin/shtrapper () {   echo "In trapper" trap 'echo "Caught in a trap!"' 2  # 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 main"&nb.........【阅读全文】

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

登录 注册