using_grep
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| using_grep [2016/09/06 18:37] – walkeradmin | using_grep [2017/01/12 20:09] (current) – walkeradmin | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== Using GREP ====== | ====== Using GREP ====== | ||
| + | <color darkorange> | ||
| + | \\ | ||
| \\ | \\ | ||
| \\ | \\ | ||
| Line 93: | Line 95: | ||
| [ 6.716496] bcm2835-wdt 3f100000.watchdog: | [ 6.716496] bcm2835-wdt 3f100000.watchdog: | ||
| [ 7.186573] brcmfmac: brcmf_sdio_drivestrengthinit: | [ 7.186573] brcmfmac: brcmf_sdio_drivestrengthinit: | ||
| + | \\ | ||
| + | Display cpu model name: | ||
| + | \\ | ||
| + | cat / | ||
| + | |||
| + | model name : ARMv7 Processor rev 4 (v7l) | ||
| + | model name : ARMv7 Processor rev 4 (v7l) | ||
| + | model name : ARMv7 Processor rev 4 (v7l) | ||
| + | model name : ARMv7 Processor rev 4 (v7l) | ||
| + | \\ | ||
| + | However, above command can be also used as follows without shell pipe: | ||
| + | \\ | ||
| + | grep -i ' | ||
| + | \\ | ||
| + | \\ | ||
| + | ===== How do I list just the names of matching files? ===== | ||
| + | Use the -l option to list file name whose contents mention main(): | ||
| + | \\ | ||
| + | grep -l ' | ||
| + | \\ | ||
| + | \\ | ||
| + | ===== Force grep to display output in colours ===== | ||
| + | Finally, you can force grep to display output in colors, enter: | ||
| + | \\ | ||
| + | <color red> | ||
| + | \\ | ||
| + | grep --color pi / | ||
| \\ | \\ | ||
| + | |||
| + | | ||
| | | ||
using_grep.1473187040.txt.gz · Last modified: (external edit)
