grep

2018-11-02  本文已影响0人  lindyang

grep [options] PATTERN [FILE...]
grep [options] [-e PATTERN | -f FILE] [FILE...]

In basic regular expressions the metacharacters 
  ? , + , { , | , ( , and  )
lose their special meaning; instead use the backslashed versions:
 \? ,\+ ,\{ ,\| ,\( , and \)

TYPE:

  • binary(default)
  • without-match(-I)
  • text(-a)

GREP_COLOR

  • never
  • auto
  • always
grep -F -e "one" -e "two" file

grep -F 'one
two' file
上一篇 下一篇

猜你喜欢

热点阅读