This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| grep "$@" # execute the grep itself | |
| grep_status="$?" # store its exit status | |
| # suppress the empty selection error indicator (exit status of 1) | |
| if [ "$grep_status" -eq 1 ]; then | |
| grep_status=0 | |
| fi | |
| exit "$grep_status" # exit with the modified exit status |
NewerOlder