Course overview + the shell

54 阅读1分钟

missing.csail.mit.edu/2020/course…

第一节课比较简单,只是简单介绍了一下shell,作业也比较简单。

值得记录的只有这个exercise:

1.  Use `|` and `>` to write the “last modified” date output by `semester` into a file called `last-modified.txt` in your home directory.

anwser:

./semester | grep "last-modified" > ~/last-modified.txt

grep 默认会输出包含你指定关键字的整行内容