Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

grep exact match

echo olavo|grep -E "^olavo$" # returns olavo
echo olavo|grep -E "ola$"    # returns none
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 :: socket install 
Shell :: tail last 100 lines 
Shell :: open tar.Z files 
Shell :: pm2 logs log time 
Shell :: sudo passwd /Users/username 
Shell :: ss in linux command stands for 
Shell :: How can I remove the first line of a text file using bash/sed script? 
Shell :: npm fibers windows error 
Shell :: Impossible de trouver le paquet php-gettext 
Shell :: laravel new project in install 
Shell :: how to install android studio in ubuntu 
Shell :: The application could not be installed: INSTALL_FAILED_CONFLICTING_PROVIDER 
Shell :: start-process id powershell 
Shell :: what is samba in linux 
Shell :: how to compile 64 bit nasm 
Shell :: run apache xampp 
Shell :: remove file history from git 
Shell :: dos view all files 
Shell :: git apply exclude file 
Shell :: connectify alternative for linux 
Shell :: linux install icloud 
Shell :: git remove first stash 
Shell :: modify a host file mac 
Shell :: git bash mac 
Shell :: instal ng2 order pipe 
Shell :: clean remote branch vscode 
Shell :: commitlint install 
Shell :: set environment variable powershell 
Shell :: gitignore file download 
Shell :: how to get token of a raw github file 
ADD CONTENT
Topic
Content
Source link
Name
9+3 =