Timeline for How to make bash abort the execution of a script on syntax error?
Current License: CC BY-SA 3.0
12 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Dec 7, 2021 at 6:52 | vote | accept | imz -- Ivan Zakharyaschev | ||
| Apr 13, 2017 at 12:37 | history | edited | CommunityBot |
replaced http://unix.stackexchange.com/ with https://unix.stackexchange.com/
|
|
| Jul 8, 2013 at 18:48 | answer | added | gniourf_gniourf | timeline score: 7 | |
| Jul 8, 2013 at 18:12 | history | tweeted | twitter.com/#!/StackUnix/status/354301901539512320 | ||
| Jul 8, 2013 at 17:02 | answer | added | tripleee | timeline score: 6 | |
| Jul 8, 2013 at 16:42 | answer | added | ahilsend | timeline score: 8 | |
| Jul 8, 2013 at 16:31 | history | edited | imz -- Ivan Zakharyaschev | CC BY-SA 3.0 |
removed "if" an arithmetic; makes no diifference
|
| Jul 8, 2013 at 16:25 | comment | added | imz -- Ivan Zakharyaschev | @jordanm Removed "if"; makes no diifference (updated my question). | |
| Jul 8, 2013 at 16:25 | history | edited | imz -- Ivan Zakharyaschev | CC BY-SA 3.0 |
removed "if"; makes no diifference
|
| Jul 8, 2013 at 16:18 | comment | added | imz -- Ivan Zakharyaschev |
@jordanm Ok, this can be an explanation why set -e hasn't worked. But my question still makes sense. Is it possible to abort on any syntax error?
|
|
| Jul 8, 2013 at 16:09 | comment | added | jordanm |
set -e is not enough because your syntax error is in a if statement. Anywhere else should abort the script.
|
|
| Jul 8, 2013 at 16:04 | history | asked | imz -- Ivan Zakharyaschev | CC BY-SA 3.0 |