Re:Bug 1202858 – Restarting squid results in deleting all fi...
by un1xl0ser on Tuesday March 24, 2015 @08:35AM
(#9256162)
$ diff -u /tmp/a /tmp/b
--- /tmp/a 2015-03-24 08:33:00.021919797 -0400
+++ /tmp/b 2015-03-24 08:33:05.629963015 -0400
@@ -1,5 +1,5 @@
#!/usr/bin/env bash
set -e
i=0
-let i++
+let i++ || true
echo "i is $i"
$ /tmp/a
$ /tmp/b
i is 1
$
You can use set -e, and turn it off (set +e) for code blocks and things that are problematic. He could also add '|| true', and you may be able to use colon to avoid point problems without turning everything off. These are edge cases and you can easily work around them if you an advanced user.
If you are not an advanced user then you should certainly use -e.