Missing-semester


Posted on Mar.24, 2020


to be an effective computer scientist and programmer.

Lecture 1 : Course Overview + The Shell

  • 待更新

Lecture 2 : Shell Tools and Scripting

    source、sh、bash、./区别

  • source a.sh
  • 在当前shell内去读取、执行a.sh,而a.sh不需要有"执行权限"。source命令可以简写为".": . a.sh
  • sh/bash a.sh
  • 都是打开一个subshell去读取、执行a.sh,而a.sh不需要有"执行权限"。subshell里运行的脚本里设置变量,不会影响到父shell的。
  • ./
  • 打开一个subshell去读取、执行a.sh,但a.sh需要有"执行权限"。可以用chmod +x添加执行权限。