📄 sgrep
字号:
#!/bin/sh# Chapter 16 - Answer to Question 1# This function is an implementation of the grep command# using sed/shell# You will need to "source" this file into your environment# using the . command.sgrep() { if [ $# -lt 2 ] ; then echo "USAGE: sgrep pattern files" >&2 exit 1 fi PAT="$1" ; shift ; for i in $@ ; do if [ -f "$i" ] ; then sed -n "/$PAT/p" $i else echo "ERROR: $i not a file." >&2 fi done return 0}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -