Program To Pattern Match

From: Bryan (Bryan.Berns_at_gmail.com)
Date: 07/18/05


Date: 17 Jul 2005 19:39:45 -0700

Simple Question;

I'm looking for a built-in program, aside from writing the obvious
one/two line script, that does this:

program -options 'pattern' $string

Where program would return 0 if match was successful. So basically I
was a 'grep' that accepts a string instead of a file/stream.

I don't want to use pipes or redirection -- it has to be in the above
format. Spefically, the error code has to be passed back to the
command line and the last argument has to be the string.

I imagine some program like this would already exists on the OS. Maybe
I'm just having a brain fart.

- Bryan



Relevant Pages