#!/bin/bash # wrapper for grep to prevent it from exiting>0 if no matching line is found /bin/grep "$@" if [ $? -gt 1 ]; then exit 2 else exit 0 fi