edit_man.sh

来自「NCURSES Programming HOWTO一书的中的NCURSES库(版」· Shell 代码 · 共 38 行

SH
38
字号
#!/bin/sh# this script is generated by the configure-scriptprefix=$1shiftmandir=$1shiftedit_man_sed=$1shiftdatadir="${prefix}/share"MKDIRS="mkinstalldirs"INSTALL="/usr/bin/install -c"INSTALL_DATA="${INSTALL} -m 644"TMP=${TMPDIR-/tmp}/man$$trap "rm -f $TMP" 0 1 2 5 15for i in $*docase $i in*.[0-9]*)	section=`expr "$i" : '.*\.\([0-9]\)[xm]*'`;	if [ ! -d $mandir/man${section} ]; then		$MKDIRS $mandir/man$section	fi	source=`basename $i`	target=`grep "^$source" man/man_db.renames | awk '{print $2}'` 	if test -z "$target" ; then		echo '? missing rename for '$source		target="$source"	fi	target="$mandir/man$section/$target"	sed -e 's,@DATADIR@,$datadir,' < $i | sed -f ${edit_man_sed} >$TMP	echo installing $target	$INSTALL_DATA $TMP $target	;;esacdone 

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?