by 1amzave · 10y ago · 0 comments
Also, as an alternative to the proposed `set +e; ...; set -e` wrapper for retrieving the exit status of something expected to exit non-zero (generally cleaner in my opinion, if slightly "clever"):
retval=0
count=$(grep -c some-string some-file) || retval=$?No comments yet.