What Does Egrep Return?

grep is used to search for text from a file or another command's output. It can return the lines where it finds a match or the lines where it doesn't.

What is an egrep?

egrep is an acronym for "Extended Global Regular Expressions Print". It is a program which scans a specified file line by line, returning lines that contain a pattern matching a given regular expression.

What does grep return if not found?

Indeed, grep returns 0 if it matches, and non-zero if it does not.

David Miller

David Miller

Executive Financial & Market Analyst

David Miller brings 15 years of experience in global economics, personal finance strategy, and market dynamics. He specializes in turning complex economic trends into actionable insights for everyday readers.