摘要:
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 阅读全文