4 ms·
Try not to delete stuff with Bash. This is the most reliable way. Bash has a few niceties for error handling, but if you are using them, you would probably far
by marcosdumay 5y ago
Try not to delete stuff with Bash.
This is the most reliable way. Bash has a few niceties for error handling, but if you are using them, you would probably fare better in another language.
If you do insist on Bash, quote everything, and use the "${var}" syntax instead of "$var". Also, make sure you handle every single possible error.
- ricardobeat 5y ago`set -e` will abort on any error, anywhere in the pipeline. It’s a must for any critical script.