example15.16

来自「UNIX[1].shell范例精解(第4版)_code」· 16 代码 · 共 22 行

16
22
字号
#!/bin/shname="Fred Fardbuckle"if grep "$name" db > /dev/null 2>&1then	echo Found $nameelse	echo "Didn't find $name"        # Fred is not in the db filefiif awk "/$name/" db > /dev/null 2>&1then	echo Found $nameelse	echo "Didn't find $name"fiif sed -n "/$name/p" db > /dev/null 2>&1then	echo Found $nameelse	echo "Didn't find $name"fi

⌨️ 快捷键说明

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