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 :: git worktree prune 
Shell :: bash string ends with 
Shell :: what does worktree prune do 
Shell :: git stash 
Shell :: git merge 
Shell :: powershell show first few lines of command 
Shell :: crontab edit 
Shell :: cs50 cli50 install 
Shell :: windows workspace shortcut 
Shell :: install apk as system app with adb 
Shell :: zsh: command not found: sublime 
Shell :: uninstall apt package ubuntu 20.04 
Shell :: sharepoint logs folder 
Shell :: Git - show all commits 
Shell :: how to install ros package 
Shell :: minikube insecure registry 
Shell :: how to check linux is ubuntu or centos 
Shell :: how can I check memory usage in linux? 
Shell :: how to boot from grub rescue 
Shell :: btop++ on ubuntu 
Shell :: deploy to firebase using trivis 
Shell :: proxmox upgrade 
Shell :: powershell which command 
Shell :: react native cannot load 
Shell :: sign a commit after push 
Shell :: download gif 
Shell :: what is echo in a batch file 
Shell :: jenkinsfile run curl in a function 
Shell :: créer un script linux 
Shell :: docker desktop for fedora 
ADD CONTENT
Topic
Content
Source link
Name
4+3 =