码迷,mamicode.com
首页 > 其他好文 > 详细

source ./ 和 . 的区别

时间:2018-06-26 16:04:51      阅读:196      评论:0      收藏:0      [点我收藏+]

标签:strong   name   from   The   file   current   区别   new   filename   

Be careful! ./ and source are not quite the same.

  • ./script runs the script as an executable file, launching a new shell to run it
  • source script reads and executes commands from filename in the current shell environment

Note: ./script is not . script, but . script == source script

source ./ 和 . 的区别

标签:strong   name   from   The   file   current   区别   new   filename   

原文地址:https://www.cnblogs.com/relax1949/p/9229248.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!