LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 692|回复: 2

这两条命令~的区别~谢谢~~

[复制链接]
发表于 2004-8-26 13:58:44 | 显示全部楼层 |阅读模式
export $STR1="my computer!"
export $STR2="my computer!  " #多一个空格
为什么
ehco $STR2的时候输出 my computer!
echo $STR1的时候输出 my computer
谢谢
 楼主| 发表于 2004-8-26 13:58:44 | 显示全部楼层 |阅读模式
export $STR1="my computer!"
export $STR2="my computer!  " #多一个空格
为什么
ehco $STR2的时候输出 my computer!
echo $STR1的时候输出 my computer
谢谢
发表于 2004-8-26 14:48:02 | 显示全部楼层
你这个export写得不标准,
照这样看,你有export 4个东西
export STR1=my computer  
export STR2=my computer!
export $STR1=my computer! ;相当于export "my computer"="my computer!"
export $STR2="my computer! " ;相当于export "my computer!"="my computer! " ;
所以很明显,事实上你可以执行set就知道了
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表