Y
Hacker News
new
|
ask
|
show
|
jobs
by
usr1106
839 days ago
But you probably still want an error if the input file does not exist. To handle grep correctly in a robust manner requires many lines of boilerplate, set +e, storing $?, set -e, distinguishing exit values 0, 1, and 2.