关于sh,bash和dash

1 debian下shell脚本的执行过程

当sh xxx.sh,或则./xxx.sh时,默认是sh解释器来执行这个shell脚本的,但是sh是到bash的软连接,所以本质上还是bash来解析这shell脚本。

2 debian下使用bash而不是用dash

debian下默认是dash,需要sudo  dpkg-reconfigure dash,来切换到bash。

 

posted @ 2017-08-04 22:03  PhoenixTree(梧桐树)  阅读(377)  评论(0编辑  收藏  举报