Thanh Thảo
New member
What is E in shell script?
Answer
The -e option means “
if any pipeline ever ends with a non-zero (‘error’) exit status, terminate the script immediately”
. Since grep returns an exit status of 1 when it doesn’t find any match, it can cause -e to terminate the script even when there wasn’t a real “error”.
Answer
The -e option means “
if any pipeline ever ends with a non-zero (‘error’) exit status, terminate the script immediately”
. Since grep returns an exit status of 1 when it doesn’t find any match, it can cause -e to terminate the script even when there wasn’t a real “error”.