Linked Questions

0 votes
3 answers
456 views

Is there any way for grep to have an AND feature? I mean something like this: I have these lines: I have this one line I don't have this other line I have this new line now I don't have this other ...
iamAguest's user avatar
  • 553
0 votes
2 answers
119 views

I am reading a list of outputs for pipewire in a shell script and looking for a specific entry. I don't know the exact name but I know the words that are in it. To find it I am using multiple greps ...
Justin Kachele's user avatar
-1 votes
1 answer
61 views

is there a way to do this? cat somefile.txt | grep this_pattern OR grep that_pattern I want display only certain lines from a large file however not just by one pattern. For example cat output.txt | ...
ron's user avatar
  • 9,175
11 votes
4 answers
51k views

I need to check if two (specified) words exist on any line in a text file. There are no limits for the characters of the words. For example: I want to find lines of a text file that contain the two ...
user avatar
4 votes
2 answers
37k views

I know that | is the logical "OR" operator inside a RegExp expression. But what is the equivalent "AND" operator (again, inside a RegExp)? Note: This is not about the multiple ...
lylklb's user avatar
  • 335
5 votes
2 answers
2k views

Is there a way to do: output | grep "string1" | grep "string2" BUT with awk, WITHOUT PIPE? Something like: output | awk '/string1/ | /string2/ {print $XY}' Result should be ...
RiddleMeThis's user avatar
7 votes
4 answers
4k views

I am still very new to command line tools (using my Mac OSX terminal) and hope I haven't missed the answer somewhere else, but I have searched for hours. I have a text file (let's call it strings.txt)...
ViolaW's user avatar
  • 81
0 votes
2 answers
2k views

I'm looking to use grep(or egrep) to find two words that are on the same line. ONT and MONDAY Flight# Airline Depart Arrive Day ------------------------------------------ 93104 TEAM ONT ...
python paradise's user avatar
0 votes
2 answers
934 views

I'm brand new to Unix and am using CygWIN64 simulator. I have a huge number of text files (tens of thousands) that I need to search for specific strings. I have had success teaching myself to search ...
user419395's user avatar
0 votes
2 answers
825 views

I have a log file that has 2 instances of 2 consecutive words on a line. Example: Process ID: 1034 Worker Process 4 I want to search for "Process ID" AND "Worker Process" on the same line. The ...
OliversDad's user avatar
1 vote
2 answers
322 views

I have a mixed wordlist as an input: azert12345 a1z2e3r4t5 a1z2e3r455 The command line I have tried to execute: cat file.txt | grep -E "[[:digit:]]{5}" --color What do I want to accomplish: Print ...
user11535592's user avatar
-1 votes
1 answer
75 views

I want to find the number of the lines that have both words/patterns "gene" and "+" in them. Is this possible to do this with grep?
Parnian's user avatar
  • 103