John Oliver wrote: > I want to grep for a given value, and if that value is found do X, and > if it isn't found, do Y. How do I do that?
Because you have two answers already, $ grep -q string file && echo found || echo not found This can have Interesting Effects if the ``found block'' has a non-zero exit code. -john -- [email protected] http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-list
