Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

grep exact match

echo olavo|grep -E "^olavo$" # returns olavo
echo olavo|grep -E "ola$"    # returns none
Comment

grep search

grep -r "texthere" .
Comment

grep search

# searches current directory ./ and subdirectories for keyword
grep -rwb . -e "regexp keyword here"
Comment

grep exact match

grep -P '^(tomcat!?)' tst1.txt
Comment

grep search match

grep -rn regex_search folder_where_to_search
#Ex: search pattern in "." current folder (r) recursively
grep -rn pattern .
Comment

grep or match

$ grep "PATTERN1|PATTERN2" FILE
$ grep -E "PATTERN1|PATTERN2" FILE
$ grep -e PATTERN1 -e PATTERN2 FILE
$ egrep "PATTERN1|PATTERN2" FILE
Comment

PREVIOUS NEXT
Code Example
Shell :: download teamviewer for ubuntu 20.04 
Shell :: cmake source directory 
Shell :: move one foile/folder to another ubuntu 
Shell :: auto start application ubuntu 18.04 
Shell :: shortcut for finder in mac 
Shell :: ubuntu apt shortcuts 
Shell :: batch concatenate strings 
Shell :: flutter release mode 
Shell :: powershell vs bash 
Shell :: git push not working 
Shell :: git cache credentials 
Shell :: install youtube-dl on ubuntu 20.04 
Shell :: command to delete a directory in linux 
Shell :: how to ping and know if the target is alive Kali Linux 
Shell :: Flutter - additional setup for linux 
Shell :: how to sync my directory with my deleted file change 
Shell :: ligne de commande pour installer lex sur linux 
Shell :: https://cloud.google.com/shell/docs/using-web-preview#previewing_the_application 
Shell :: install jake 
Php :: print last query laravel 
Php :: install php8.1 
Php :: get url segment in php 
Php :: how to get ip address of client using php 
Php :: php header location 
Php :: php wait 
Php :: wordpress is_archive 
Php :: get_template_directory_uri 
Php :: laravel migration refresh 
Php :: laravel ui auth 
Php :: brew switch php version 
ADD CONTENT
Topic
Content
Source link
Name
1+4 =