Ken's Lotto Syndicate

Powerball Syndicate Home Page

Site Tools


grep

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
grep [2025/05/01 23:58] kengrep [2026/07/07 23:13] (current) – external edit 127.0.0.1
Line 39: Line 39:
 $ grep 'PATTERN1' FILE | grep 'PATTERN2' $ grep 'PATTERN1' FILE | grep 'PATTERN2'
 </code>\\ </code>\\
-=== Using awk command (exact order): === +**Using awk command (exact order):**
 <code> <code>
 $ awk '/PATTERN1.*PATTERN2/' FILE $ awk '/PATTERN1.*PATTERN2/' FILE
 </code> </code>
-=== Using awk command (any order): === +**Using awk command (any order):**
 <code> <code>
 $ awk '/PATTERN1/ && /PATTERN2/' FILE $ awk '/PATTERN1/ && /PATTERN2/' FILE
-</code> +</code>\\ 
-=== Using sed command (exact order): === +**Using sed command (exact order):**
 <code> <code>
 $ sed '/PATTERN1.*PATTERN2/!d' FILE $ sed '/PATTERN1.*PATTERN2/!d' FILE
-</code> +</code>\\ 
-=== Using sed command (any order): === +**Using sed command (any order):**
 <code> <code>
 $ sed '/PATTERN1/!d; /PATTERN2/!d' FILE $ sed '/PATTERN1/!d; /PATTERN2/!d' FILE
grep.1746143906.txt.gz · Last modified: (external edit)