Get Help And Discuss STEM Concepts From Math To Data Science & Financial Literacy
STEM Gender Equality | Join us on ZOOM | Spreading Mathematical Happiness | Join Us on Slack

MathsGee is free of annoying ads. We want to keep it like this. You can help with your DONATION

0 like 0 dislike
24 views
What is the grep command? How do you match multiple strings in the same line?
in Computer Science by Diamond (51,000 points) | 24 views

1 Answer

0 like 0 dislike

The grep utilities are a family of Unix tools, including egrep and fgrep.

grep searches file patterns. If you are looking for a specific pattern in the output of another command, grep highlights the relevant lines. Use this grep command for searching log files, specific processes, and more.

For match multiple strings:

grep -E "string1|string2" filename

or

grep -e "string1" -e "string2" filename
by Diamond (51,000 points)

Related questions

0 like 0 dislike
1 answer
0 like 0 dislike
0 answers
0 like 0 dislike
1 answer
asked Aug 29, 2019 in Computer Science by Tedsf Diamond (51,000 points) | 19 views
0 like 0 dislike
0 answers
asked Aug 30, 2019 in Computer Science by Tedsf Diamond (51,000 points) | 19 views
0 like 0 dislike
0 answers
0 like 0 dislike
1 answer
asked Aug 29, 2019 in Computer Science by Tedsf Diamond (51,000 points) | 22 views
0 like 0 dislike
1 answer
asked Aug 29, 2019 in Computer Science by Tedsf Diamond (51,000 points) | 38 views
0 like 0 dislike
0 answers
asked Mar 11, 2019 in Data Science by Edzai Zvobwo Bronze Status (8,601 points) | 25 views

Welcome to MathsGee Q&A Bank, Africa’s largest personalized STEM and Financial Literacy education network that helps people find answers to problems, connect with others and take action to improve their outcomes.


MathsGee Q&A is the STEM and Financial Literacy knowledge-sharing community where students and experts put their heads together to crack their toughest questions.


MathsGee is free of annoying ads. We want to keep it like this. You can help with your DONATION

Enter your email address:

11,765 questions
9,729 answers
100 comments
10,512 users