Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

bash grep for two terms in same line

# Basic syntax:
grep first_word input_file | grep second_word
# Where:
#	- this finds all lines that contain the first_word and then pipes them
# 	  to a second filter that looks for the second_word, resulting in all
# 	  lines that contain both words. Simply add more pipes and greps to 
# 	  return lines that meet other search criteria. 
Comment

how to grep two terms at once grep

grep -e "BBB" -e "AAA" file.txt 
Comment

PREVIOUS NEXT
Code Example
Shell :: docker install python 
Shell :: git undo deleted local branch 
Shell :: chmod just directories 
Shell :: using yarn in docker 
Shell :: install and import gsap in vue 
Shell :: reset gpg passphrase 
Shell :: how to watch a log file in linux 
Shell :: ash if statment 
Shell :: install simplejwt django 
Shell :: github api fetch 
Shell :: list of installed packages and version 
Shell :: Install Strimio on ubuntu 
Shell :: /gi regex 
Shell :: bash copy directory and all contents 
Shell :: arch linux pacman cannot install 
Shell :: post with httpie 
Shell :: how to reverse shell 
Shell :: install cocoapi 
Shell :: install psql mac 
Shell :: mssql-tools : depends: msodbcsql17 (= 17.3.0.0) but it is not going to be installed 
Shell :: install redis 
Shell :: keytool export a certificate 
Shell :: git history 
Shell :: magento installer 
Shell :: linux ssh server 
Shell :: flatpak repo 
Shell :: pdf to images imagemagick 
Shell :: echo venv/ .gitignore 
Shell :: linux terminal show processes 
Shell :: brew check installed version 
ADD CONTENT
Topic
Content
Source link
Name
2+4 =