摘要: 1. bash命令行中的变量赋值语句只适用于该命令This example comes from A practical guide to Fedora and Red Hat Enterprise Linux (6th ed.).$ cat my_scriptecho $TEMPDIR$ TEMPDIR=/home/sam/temp ./my_script/home/sam/temp$ echo $TEMPDIR$2. bash在将变量作为参数传给其他程序时会自动压缩相邻的空格如果想保留多个相邻的空格,则应该使用双引号将变量引起。This example comes from Sobell 阅读全文
posted @ 2012-10-27 10:49 UniMouS 阅读(278) 评论(0) 推荐(0) 编辑

版权所有 © 2011-2012 方一曙

Copyright © 2011-2012 Fang Yishu (UniMouS)