1. 程式人生 > >source ./ 和 . 的區別

source ./ 和 . 的區別

ron not command and careful str ref display launching

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 ./ 和 . 的區別