Tuesday 6 August 2019

Ubuntu pipe, grep command

https://www.maketecheasier.com/what-is-grep-and-uses/

Grep will list them all out and highlight the “.jpg” part since it’s what you searched for.

You pipe the output (with the command “|”) of just about any command into grep. If you have a plain text file laying around, cat it out and pipe the result into Grep to find a specific word.
Grep will print out any lines in the file containing the word that you told it to look for.

Unix-like systems are case sensitive, meaning that “Ubuntu” is completely different than “ubuntu.” That can be a pain when searching for something. Grep has a flag to eliminate the problem. Add the -i flag to your search, and Grep will ignore case.

No comments:

Post a Comment