Guest User

Untitled

a guest
Apr 23rd, 2018
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.91 KB | None | 0 0
  1. $ man grep | sed -n '/-i, --ignore-case/,+2p'
  2. -i, --ignore-case
  3. Ignore case distinctions in both the PATTERN and the input
  4. files. (-i is specified by POSIX.)
  5.  
  6. sed -n '/-i, --ignore-case/,+2p'
  7.  
  8. |<-Search pattern->|
  9.  
  10. avinash@avinash-Lenovo-IdeaPad-Z500:~$ man grep | sed -n '/ *i, -/,+3p'
  11. -i, --ignore-case
  12. Ignore case distinctions in both the PATTERN and the input
  13. files. (-i is specified by POSIX.)
  14.  
  15. avinash@avinash-Lenovo-IdeaPad-Z500:~$ man grep | sed -n '/ *V, -/,+3p'
  16. -V, --version
  17. Print the version number of grep to the standard output stream.
  18. This version number should be included in all bug reports (see
  19. below).
  20. avinash@avinash-Lenovo-IdeaPad-Z500:~$ man grep | sed -n '/ *F, -/,+3p'
  21. -F, --fixed-strings
  22. Interpret PATTERN as a list of fixed strings, separated by
  23. newlines, any of which is to be matched. (-F is specified by
  24. POSIX.)
  25. avinash@avinash-Lenovo-IdeaPad-Z500:~$ man grep | sed -n '/ *G, -/,+3p'
  26. -G, --basic-regexp
  27. Interpret PATTERN as a basic regular expression (BRE, see
  28. below). This is the default.
  29.  
  30. man grep
  31.  
  32. $ man grep | grep -A 1 '^ *-i'
  33. -i, --ignore-case
  34. Ignore case distinctions in both the PATTERN and the input
  35. files. (-i is specified by POSIX.)
  36.  
  37. info grep Invoking Command-line Options Matching Control
  38.  
  39. info --apropos=--ignore-case
  40. "(coreutils)join invocation" -- --ignore-case <1>
  41. "(coreutils)uniq invocation" -- --ignore-case <2>
  42. "(coreutils)sort invocation" -- --ignore-case
  43. "(gettext)msggrep Invocation" -- --ignore-case, ‘msggrep’ option
  44. "(grep)Matching Control" -- --ignore-case
  45.  
  46. man grep | perl -00 -ne 'print if / -i/'
  47.  
  48. LESS='+/--all' man ls
  49.  
  50. LESS='+/-a' man ls
  51.  
  52. /s{2,}-i
  53.  
  54. / {2,}-i
  55. ^------------- space here
Add Comment
Please, Sign In to add comment