suname.sh

来自「su 的源代码库」· Shell 代码 · 共 84 行

SH
84
字号
#! /bin/sh# /*********************** self documentation **********************/# SUNAME - get name line from self-docs## Usage: suname [name]## Note: dummy selfdocs have been included in all cwp and shell programs#       that don't have automatic selfdocs.# /**************** end self doc ********************************/# $Source: /usr/local/cwp/src/su/shell/RCS/suname.sh,v $# $Revision: 1.22 $ ; $Date: 1999/05/12 20:15:48 $# test for CWPROOTif test "${CWPROOT}" = ""then	echo "The environment variable \"CWPROOT\" "	echo "is not set in the user's working shell environment."	echo "To set this variable in C-shell, use the command: "	echo "  setenv  CWPROOT  /your/cwp/root/path"	echo "To set this variable in Bourne or Korn-shell, use the command:"	echo "  export  CWPROOT=/your/cwp/root/path" ; exit 1fi################################################################################# test for CWPSRC, use value if set, define as $CWPROOT if not set# (CWPSRC allows one set of source code and documentation for multiple machines)################################################################################if test "${CWPSRC}" = ""thenCWPSRC=$CWPROOTfiROOT=${CWPROOT}SRC=${CWPSRC}/srcBIN=$ROOT/binSU=$SRC/suNAMES=$SRC/doc/Headers/Headers.allDOCS=$SRC/doc/StrippedPATH=${PATH}:${BIN}# test to see if user has a preferred PAGERif test "$PAGER" = ""	then		PAGE_PROGRAM=more	else		PAGE_PROGRAM=$PAGER	ficmd=`basename $0`case $# in0)	echo " -----  CWP Free Programs -----   "	echo "CWPROOT=$CWPROOT"	$PAGE_PROGRAM $NAMES;;*)	grep -i $* $NAMES;;esacechoecho "To search on a program name fragment, type:" echo "     \"suname name_fragment <CR>\""echoecho "For more information type: \"program_name <CR>\""echoecho "  Items labeled with an asterisk (*) are C programs that may"echo "  or may not have a self documentation feature."echoecho "  Items labeled with a pound sign (#) are shell scripts that may,"echo "  or may not have a self documentation feature."echo echo " To find information about these codes type:   sudoc program_name"exit 0

⌨️ 快捷键说明

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