Bash Pipefail + Grep Error Handling When is enabled, returning exit code 1 (no match) will kill the script. The naive after a pipeline won't catch failures within the pipe. Wrap the entire pipeline in a subshell or function to isolate the scope, allowing the to actually catch the failure. Use pattern for optional lookups in configuration scripts. ---