in reply to Re: search for a pattern in file without opening the file
in thread search for a pattern in file without opening the file

If the grep finds a match it returns 0 or 1?
  • Comment on Re^2: search for a pattern in file without opening the file

Replies are listed 'Best First'.
Re^3: search for a pattern in file without opening the file
by hippo (Archbishop) on Oct 30, 2018 at 09:04 UTC

    Yes, as explained in the Exit Status section of the man page.