⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 grep.sh

📁 su 的源代码库
💻 SH
字号:
#! /bin/sh# /*********************** self documentation **********************/# Grep  - recursively call egrep in pwd## Usage: Grep [-egrep_options] pattern## Caution:  Do NOT redirect into file in pwd, either use something#	like  >../Grep.out or perhaps pipe output into mail to yourself.## Author: Jack, 7/95## /**************** end self doc ********************************/PATH=/bin:/usr/bin:/usr/ucb:cmd=`basename $0`BINDIR=$CWPROOT/bincase $# in0)  echo "Usage: $cmd [-egrep_options] pattern" 1>&2    exit 1esacfor ido	case $i in	-*)		option="$option $i"		shift	;;	*)		pattern="$*"	;;	esacdonefor i in `ls`do	if		[ -d $i ]	then		cd $i		$BINDIR/Grep $option "$pattern"		cd ..	elif		[ -f $i ]	then		if			egrep $option "$pattern" $i >/dev/null		then			echo			echo "`pwd`/$i:"			egrep $option "$pattern" $i		fi	fidoneexit 0

⌨️ 快捷键说明

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