Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

linux 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.                              |
# +--------+----------------------------------------------------------------------------+
Comment

PREVIOUS NEXT
Code Example
Shell :: folding at home bash 
Shell :: install sketchjs 
Shell :: how to convert vdi to gnome boxes 
Shell :: statistical inference project part 1 github 
Shell :: uncommitted modifications to Homebrew/homebrew-core 
Shell :: 28 essential aws s3 command line 
Shell :: Failed to download pear within preferred state "stable" 
Shell :: composer install delete from parameters.yml symfony 3 
Shell :: install mvc 5.2.4 nugget console 
Php :: enable php error 
Php :: human readable date laravel 
Php :: php start session if not started 
Php :: php curl print status 
Php :: Class "AppHttpControllersAuth" not found 
Php :: php 0 padding left 
Php :: fluid inline if 
Php :: how get the latest data in database in laravel 
Php :: wordpress get theme uri 
Php :: php read csv file line by line 
Php :: php preg_match email validation code 
Php :: how to show validation error in laravel blade 
Php :: php if url contains 
Php :: php function to remove underscore 
Php :: php return a header 200 
Php :: create laravel project 8.16.1 
Php :: php get elapsed time 
Php :: php all keys in array 
Php :: close mysql connection in php 
Php :: migrate specific migration laravel 
Php :: php get subdomain 
ADD CONTENT
Topic
Content
Source link
Name
3+1 =