Exactly what the title says. I'm not having much luck finding the proper documentation to see what -xe does in the following use case:
#!/bin/bash -xe
what do those parameters do and where it is documented?
bashscripting
Exactly what the title says. I'm not having much luck finding the proper documentation to see what -xe does in the following use case:
#!/bin/bash -xe
what do those parameters do and where it is documented?
Best Answer
If you read the man page for
bash
you'll find the following at the top of theOPTIONS
section:And if you read the documentation for the
set
command later on in the man page, you'll find:In other words,
-e
makes the shell exit immediately whenever something returns an error (this is often used in shell scripts as a failsafe mechanism), and-x
enables verbose execution of scripts so that you can see what's happening.