?? from.sh
字號:
#!/bin/bash# from.sh# Emulates the useful "from" utility in Solaris, BSD, etc.# Echoes the "From" header line in all messages#+ in your e-mail directory.MAILDIR=~/mail/* # No quoting of variable. Why?GREP_OPTS="-H -A 5 --color" # Show file, plus extra context lines #+ and display "From" in color.TARGETSTR="^From" # "From" at beginning of line.for file in $MAILDIR # No quoting of variable.do grep $GREP_OPTS "$TARGETSTR" "$file" # ^^^^^^^^^^ # Again, do not quote this variable. echodoneexit $?# Might wish to pipe the output of this script to 'more' or#+ redirect it to a file . . .
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -