Script
script
命令接受本地文件作为参数,并逐个重播在其中找到的命令。
The script
command accepts a local file as an argument and replays commands found there, one at a time.
从文件读取的行为与在交互式 shell 中完全相同,因此以 //
开头的行被视为注释并被忽略,而以 \
结尾的行触发行延续。
Reading from the file behaves exactly like inside the interactive shell, so lines starting with //
are considered
to be comments and are ignored, while lines ending with \
trigger line continuation.