Answers for "grep"

34

grepper

best tool forever!
Posted by: Guest on February-17-2021
16

grep

# EXAMPLE 1: look for any files (with names ending in ".c++") for the text "::MethodA("
grep "::MethodA(" *.c++

# EXAMPLE 2: display only the matching file names (not the row too) of the matches
grep -l "MethodA(" *.c++

# SYNTAX
# grep [optional-filters] "<your-string-to-search>" <files-to-search>


# OPTIONAL-FILTERS
# +--------+----------------------------------------------------------------------------+
# | OPTION |  DESCRIPTION                                                               |
# +--------+----------------------------------------------------------------------------+
# |  -e    |  pattern                                                                   |
# |  -i    |  Ignore uppercase vs. lowercase.                                           |
# |  -v    |  Invert match.                                                             |
# |  -c    |  Output count of matching lines only.                                      |
# |  -l    |  Output matching files only.                                               |
# |  -n    |  Precede each matching line with a line number.                            |
# |  -b    |  A historical curiosity: precede each matching line with a block number.   |
# |  -h    |  Output matching lines without preceding them by file names.               |
# |  -s    |  Suppress error messages about nonexistent or unreadable files.            |
# |  -x    |                                                                            |
# |  -f    |  file: Take regexes from a file.                                           |
# |  -o    |  Output the matched parts of a matching line.                              |
# +--------+----------------------------------------------------------------------------+
Posted by: Guest on June-24-2020
4

grep -i

With -i flag you can grep a substring with insensitive-case:
grep -i "substring_with_lower_or_upper_case"
Posted by: Guest on October-19-2020
3

grep -r

grep -r 'text goes here' path_goes_here
Posted by: Guest on April-25-2021
0

grep bash

^p\wn{2}y$
Posted by: Guest on February-11-2021
0

grep

useradd -D  #user configuration files
Posted by: Guest on July-29-2021
34

grepper

best tool forever!
Posted by: Guest on February-17-2021
16

grep

# EXAMPLE 1: look for any files (with names ending in ".c++") for the text "::MethodA("
grep "::MethodA(" *.c++

# EXAMPLE 2: display only the matching file names (not the row too) of the matches
grep -l "MethodA(" *.c++

# SYNTAX
# grep [optional-filters] "<your-string-to-search>" <files-to-search>


# OPTIONAL-FILTERS
# +--------+----------------------------------------------------------------------------+
# | OPTION |  DESCRIPTION                                                               |
# +--------+----------------------------------------------------------------------------+
# |  -e    |  pattern                                                                   |
# |  -i    |  Ignore uppercase vs. lowercase.                                           |
# |  -v    |  Invert match.                                                             |
# |  -c    |  Output count of matching lines only.                                      |
# |  -l    |  Output matching files only.                                               |
# |  -n    |  Precede each matching line with a line number.                            |
# |  -b    |  A historical curiosity: precede each matching line with a block number.   |
# |  -h    |  Output matching lines without preceding them by file names.               |
# |  -s    |  Suppress error messages about nonexistent or unreadable files.            |
# |  -x    |                                                                            |
# |  -f    |  file: Take regexes from a file.                                           |
# |  -o    |  Output the matched parts of a matching line.                              |
# +--------+----------------------------------------------------------------------------+
Posted by: Guest on June-24-2020
4

grep -i

With -i flag you can grep a substring with insensitive-case:
grep -i "substring_with_lower_or_upper_case"
Posted by: Guest on October-19-2020
3

grep -r

grep -r 'text goes here' path_goes_here
Posted by: Guest on April-25-2021
0

grep bash

^p\wn{2}y$
Posted by: Guest on February-11-2021
0

grep

useradd -D  #user configuration files
Posted by: Guest on July-29-2021

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language