Say you have some text and some pattern that you want to provide for grep. Everything is easy, until you want to extract only the pattern-matching part, not the whole line that has the match. What to do? You can “grep” and use pipe for further processing, like sed or awk. But did you know that you can grep only capturing group output without using anything else? We will be using “grep -P” (Perl Compatible Regular Expressions – PCRE) for that.
Continue readingTag: grep
few useful commands while searching for files / patterns in files
Searching for files or patterns in files occurs quite frequently when dealing with CLI daily. Search for files in Linux is one of the essential skills to have while administrating servers. Here are few useful commands for fast implementation of such tasks.
Continue reading