📄 self-document.sh
字号:
#!/bin/bash# self-document.sh: 自文档化(self-documenting)的脚本# 修改于"colm.sh".DOC_REQUEST=70if [ "$1" = "-h" -o "$1" = "--help" ] # 请求帮助. then echo; echo "Usage: $0 [directory-name]"; echo sed --silent -e '/DOCUMENTATIONXX$/,/^DOCUMENTATIONXX$/p' "$0" | sed -e '/DOCUMENTATIONXX$/d'; exit $DOC_REQUEST; fi: <<DOCUMENTATIONXXList the statistics of a specified directory in tabular format.---------------------------------------------------------------The command line parameter gives the directory to be listed.If no directory specified or directory specified cannot be read,then list the current working directory.DOCUMENTATIONXXif [ -z "$1" -o ! -r "$1" ]then directory=.else directory="$1"fi echo "Listing of "$directory":"; echo(printf "PERMISSIONS LINKS OWNER GROUP SIZE MONTH DAY HH:MM PROG-NAME\n" \; ls -l "$directory" | sed 1d) | column -texit 0
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -