📄 whatis.sh
字号:
#!/bin/sh## whatis/apropos 1.3 - search whatis(5) database for commands# Author: Kees J. Bot# BUGS# whatis file must be as if created by makewhatis(8).#all='exit 0'case "$1" in-a) all="found='exit 0'" shiftesaccase $#:$0 in1:*whatis) ;;1:*apropos) all="found='exit 0'" ;;*) echo "Usage: `basename $0` [-a] <keyword>" >&2 exit 1esacIFS=":$IFS"MANPATH="${MANPATH-/usr/local/man:/usr/man}"found=for m in $MANPATHdo for w in $m/whatis do test -f $w || continue case $0 in *whatis) grep "^($1|[^(]* $1)[ ,][^(]*\\(" $w && eval $all ;; *apropos) grep -i "$1" $w && eval $all esac donedone$foundecho "`basename $0`: $1: not found" >&2exit 1
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -