# grep

## Case-insensitive grep a file for a word/term
```
grep -i "some term" somefile.txt
```

### Grep if there are binary matches found
```
cat somefile.txt | grep -i match --text
```

## Match whole words in a file
```
grep -w 'hi' somebigfile.txt
```

## Search for word in file but still display rest of the file and only highlight matches
```
grep -i "REMOVE\|" log
```
*Source: [Twitter](https://x.com/grahamhelton3/status/1834211573549686847?s=51)*
