Jump to content

Searching with grep


grep
 Share

Recommended Posts

https://fedoramagazine.org/command-line-quick-tips-searching-with-grep/

 

Introducing grep

 

The grep utility allows you to search for text, or more specifically text patterns, on your file system. The name grep comes from global regular expression print. Yikes, what a mouthful! This is because a regular expression (or regex) is a way of defining text patterns.

The grep utility lets you find and print out matches on these patterns — thus the name.

  • Like 2
Link to comment
Share on other sites

It's been 5 years since I wrote a utility/monitoring script on Linux for MySQL.

 

echo "show full processlist\G" | mysql -h$host | grep -B 6 -A 1 Locked

  • Like 2
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...