<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xml:lang="zh-CN" xmlns="http://www.w3.org/1999/xhtml" lang="zh-CN"><head><meta content="text/html; charset=UTF-8" http-equiv="Content-Type"><title>Linux 技巧: Bash 参数和参数扩展</title><!-- s-header-meta for china -->
<meta http-equiv="PICS-Label" content="(PICS-1.1 "http://www.icra.org/ratingsv02.html" l gen true r (cz 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l gen true r (n 0 s 0 v 0 l 0) "http://www.classify.org/safesurf/" l gen true r (SS~~000 1))">
<link rel="schema.DC" href="http://purl.org/DC/elements/1.0/">
<link rel="SHORTCUT ICON" href="http://www.ibm.com/favicon.ico">
<meta name="Owner" content="dw@cn.ibm.com">
<meta name="DC.Language" scheme="rfc1766" content="zh-CN">
<meta name="IBM.Country" content="CN">
<meta name="Security" content="Public">
<!-- 5.8 0421 egd: Added IBM.Special.Purpose meta tag and the meta tag to suppress the WI login in the masthead -->
<meta name="IBM.SpecialPurpose" content="SP001">
<meta name="IBM.PageAttributes" content="sid=1003"><meta name="Abstract" content="您是否有时想知道如何对脚本使用参数,以及如何将参数传递给内部函数或其他脚本?是否需要对参数或选项做一些简单的有效性测试?或者对参数字符串执行一些简单的析取和替换操作?本文将向您介绍参数的用法和 bash shell 中的各种参数扩展。"><meta name="Description" content="您是否有时想知道如何对脚本使用参数,以及如何将参数传递给内部函数或其他脚本?是否需要对参数或选项做一些简单的有效性测试?或者对参数字符串执行一些简单的析取和替换操作?本文将向您介绍参数的用法和 bash shell 中的各种参数扩展。"><meta name="Keywords" content="linux, tip, bash, parameter, string, functions, expansion, extraction, option, getopts, replacement, ian shields, 技巧, 参数, 字符串, 函数, 扩展, 析取, 选项, 替换, tttlca, dddauca, tttosca"><meta name="DC.Date" scheme="iso8601" content="2007-07-30"><meta name="DC.Type" scheme="IBM_ContentClassTaxonomy" content="CT316"><meta name="DC.Subject" scheme="IBM_SubjectTaxonomy" content="SWGC0"><meta name="DC.Rights" content="Copyright (c) 2007 by IBM Corporation"> <meta name="Robots" content="index,follow"><meta name="IBM.Effective" scheme="W3CDTF" content="2007-07-30"><meta name="Last update" content="02032008jincx@cn.ibm.com"><!-- STYLESHEETS/SCRIPTS -->
<!-- for tables -->
<link rel="stylesheet" type="text/css" media="screen,print" href="bash%E5%8F%82%E6%95%B0%E5%92%8C%E5%8F%82%E6%95%B0%E6%89%A9%E5%B1%95_files/table.css">
<!-- end for tables -->
<script language="JavaScript" src="bash%E5%8F%82%E6%95%B0%E5%92%8C%E5%8F%82%E6%95%B0%E6%89%A9%E5%B1%95_files/dwcss14.js" type="text/javascript"></script><link rel="stylesheet" href="bash%E5%8F%82%E6%95%B0%E5%92%8C%E5%8F%82%E6%95%B0%E6%89%A9%E5%B1%95_files/r1v14.css" type="text/css">
<link rel="stylesheet" type="text/css" href="bash%E5%8F%82%E6%95%B0%E5%92%8C%E5%8F%82%E6%95%B0%E6%89%A9%E5%B1%95_files/main.css">
<link rel="stylesheet" type="text/css" media="all" href="bash%E5%8F%82%E6%95%B0%E5%92%8C%E5%8F%82%E6%95%B0%E6%89%A9%E5%B1%95_files/screen.css">
<link rel="stylesheet" type="text/css" media="print" href="bash%E5%8F%82%E6%95%B0%E5%92%8C%E5%8F%82%E6%95%B0%E6%89%A9%E5%B1%95_files/print.css">
<script language="JavaScript" src="bash%E5%8F%82%E6%95%B0%E5%92%8C%E5%8F%82%E6%95%B0%E6%89%A9%E5%B1%95_files/detection.js" type="text/javascript"></script>
<script language="JavaScript" src="bash%E5%8F%82%E6%95%B0%E5%92%8C%E5%8F%82%E6%95%B0%E6%89%A9%E5%B1%95_files/dropdown.js" type="text/javascript"></script>
<script language="JavaScript" src="bash%E5%8F%82%E6%95%B0%E5%92%8C%E5%8F%82%E6%95%B0%E6%89%A9%E5%B1%95_files/grabtitle.js" type="text/javascript"></script>
<script language="JavaScript" src="bash%E5%8F%82%E6%95%B0%E5%92%8C%E5%8F%82%E6%95%B0%E6%89%A9%E5%B1%95_files/emailfriend2.js" type="text/javascript"></script><!--START RESERVED FOR FUTURE USE INCLUDE FILES--><script language="javascript" src="bash%E5%8F%82%E6%95%B0%E5%92%8C%E5%8F%82%E6%95%B0%E6%89%A9%E5%B1%95_files/ajax1.js" type="text/javascript"></script><script language="javascript" src="bash%E5%8F%82%E6%95%B0%E5%92%8C%E5%8F%82%E6%95%B0%E6%89%A9%E5%B1%95_files/searchcount.js" type="text/javascript"></script><!--END RESERVED FOR FUTURE USE INCLUDE FILES--><script language="JavaScript" type="text/javascript">var emailAbstract = "您是否有时想知道如何对脚本使用参数,以及如何将参数传递给内部函数或其他脚本?是否需要对参数或选项做一些简单的有效性测试?或者对参数字符串执行一些简单的析取和替换操作?本文将向您介绍参数的用法和 bash shell 中的各种参数扩展。"; </script></head><body><!--MASTHEAD_BEGIN--><table width="100%" border="0" cellpadding="0" cellspacing="0"><tbody><tr valign="top"><td class="bbg" width="110"><a href="http://www.ibm.com/cn/"><img alt="IBM®" src="bash%E5%8F%82%E6%95%B0%E5%92%8C%E5%8F%82%E6%95%B0%E6%89%A9%E5%B1%95_files/ibm-logo.gif" width="110" border="0" height="52"></a></td><td class="bbg"><img src="bash%E5%8F%82%E6%95%B0%E5%92%8C%E5%8F%82%E6%95%B0%E6%89%A9%E5%B1%95_files/c.gif" alt="" width="1" border="0" height="1"></td><td class="mbbg" width="650" align="right"><table align="right" border="0" cellpadding="0" cellspacing="0"><tbody><tr class="cty-tou"><td rowspan="2" class="upper-masthead-corner" width="17"><a href="#main"><img src="bash%E5%8F%82%E6%95%B0%E5%92%8C%E5%8F%82%E6%95%B0%E6%89%A9%E5%B1%95_files/c.gif" alt="跳转到主要内容" width="1" border="0" height="1"></a></td><td align="left"><table align="left" border="0" cellpadding="0" cellspacing="0"><tbody><tr><td><span class="spacer"> </span><b class="country">中国</b><span class="spacer"> [</span><a class="ur-link" href="http://www.ibm.com/developerworks/cn/country/">选择</a><span class="spacer">]</span></td><td class="upper-masthead-divider" width="29"> </td><td align="left"><a class="ur-link" href="http://www.ibm.com/legal/cn/">使用条款</a></td></tr></tbody></table></td><td width="40"> </td></tr><tr><td class="cty-tou-border" colspan="2" height="1"><img src="bash%E5%8F%82%E6%95%B0%E5%92%8C%E5%8F%82%E6%95%B0%E6%89%A9%E5%B1%95_files/c.gif" alt="" width="1" height="1"></td></tr><tr><td colspan="3"><img alt="" src="bash%E5%8F%82%E6%95%B0%E5%92%8C%E5%8F%82%E6%95%B0%E6%89%A9%E5%B1%95_files/c.gif" width="1" height="8"></td></tr><tr><td> </td><td colspan="2" align="center"><form method="get" action="http://www-128.ibm.com/developerworks/search/searchResults.jsp" id="form1" name="form1"><input name="searchType" value="1" type="hidden"><input name="searchSite" value="dWChina" type="hidden"><input name="pageLang" value="zh" type="hidden"><input name="langEncoding" value="UTF8" type="hidden"><table border="0" cellpadding="0" cellspacing="0"><tbody><tr><td width="1"><img src="bash%E5%8F%82%E6%95%B0%E5%92%8C%E5%8F%82%E6%95%B0%E6%89%A9%E5%B1%95_files/c.gif" alt="Select a scope:" width="1" height="1"></td><td align="right"><label for="sq"><select id="sq" name="searchScope" class="input-scope"><option value="dW" selected="selected">dW 全部内容</option><option value="dW">-----------------</option><option value="aixunix"> AIX and UNIX</option><option value="dmdd"> Information management</option><option value="lotusdd"> Lotus</option><option value="rdd"> Rational</option><option value="tivolidd"> Tivoli</option><option value="wsdd"> WebSphere</option><option value="dW">-----------------</option><option value="gridZ"> Grid computing</option><option value="javaZ"> Java 技术</option><option value="linuxZ"> Linux</option><o
没有合适的资源?快使用搜索试试~ 我知道了~
linux shell测试
需积分: 0 15 下载量 127 浏览量
2008-09-07
12:36:24
上传
评论
收藏 278KB GZ 举报
温馨提示
共159个文件
gif:73个
js:48个
css:30个
shell编程后用来进行测试 cd cat
资源详情
资源评论
资源推荐
收起资源包目录
linux shell测试 (159个子文件)
main.css 14KB
main.css 14KB
main.css 14KB
main.css 14KB
main.css 14KB
main.css 14KB
screen.css 11KB
screen.css 11KB
screen.css 11KB
screen.css 11KB
screen.css 11KB
screen.css 11KB
r1v14.css 7KB
r1v14.css 7KB
r1v14.css 7KB
r1v14.css 7KB
r1v14.css 7KB
r1v14.css 7KB
print.css 4KB
print.css 4KB
print.css 4KB
print.css 4KB
print.css 4KB
print.css 4KB
table.css 3KB
table.css 3KB
table.css 3KB
table.css 3KB
table.css 3KB
table.css 3KB
robbins.gif 5KB
robbins.gif 5KB
robbins.gif 5KB
search.gif 1KB
search.gif 1KB
search.gif 1KB
search.gif 1KB
search.gif 1KB
search.gif 1KB
delicious.gif 846B
delicious.gif 846B
dw.gif 828B
dw.gif 828B
dw.gif 828B
dw.gif 828B
dw.gif 828B
dw.gif 828B
ibm-logo.gif 430B
ibm-logo.gif 430B
ibm-logo.gif 430B
ibm-logo.gif 430B
ibm-logo.gif 430B
ibm-logo.gif 430B
slashdot-favicon.gif 97B
slashdot-favicon.gif 97B
10x10-digg-thumb.gif 95B
10x10-digg-thumb.gif 95B
left-nav-corner.gif 94B
left-nav-corner.gif 94B
left-nav-corner.gif 94B
left-nav-corner.gif 94B
left-nav-corner.gif 94B
left-nav-corner.gif 94B
printer.gif 77B
printer.gif 77B
em.gif 73B
em.gif 73B
em.gif 73B
em.gif 73B
em.gif 73B
em.gif 73B
u_bold.gif 64B
u_bold.gif 64B
fw_bold.gif 64B
u_bold.gif 64B
fw_bold.gif 64B
u_bold.gif 64B
u_bold.gif 64B
u_bold.gif 64B
cl-bullet.gif 46B
rl-bullet.gif 46B
cl-bullet.gif 46B
rl-bullet.gif 46B
cl-bullet.gif 46B
rl-bullet.gif 46B
cl-bullet.gif 46B
rl-bullet.gif 46B
cl-bullet.gif 46B
rl-bullet.gif 46B
cl-bullet.gif 46B
rl-bullet.gif 46B
c.gif 43B
c.gif 43B
c.gif 43B
c.gif 43B
c.gif 43B
c.gif 43B
blue_rule.gif 35B
blue_rule.gif 35B
blue_rule.gif 35B
共 159 条
- 1
- 2
wangjunhuashuo
- 粉丝: 0
- 资源: 1
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论0