Ivan Shmakov <[email protected]> writes:
> ? How is the ‘if’ statement above different to, say:
> case "$1" in
> (remove)
> update-alternatives --remove <foo> <path-to-foo>
> ;;
> esac
It's not; what it *is* different from is the more common case
construction, which instead looks like:
case "$1" in
(remove)
update-alternatives --remove <foo> <path-to-foo>
;;
(upgrade|failed-upgrade|deconfigure)
;;
(*)
echo "Unknown call $@" >&2
exit 1
;;
esac
If the case doesn't have that default case, it doesn't have this problem,
but when you see the case statement, you usually see that form.
--
Russ Allbery ([email protected]) <http://www.eyrie.org/~eagle/>
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]
Archive: http://lists.debian.org/[email protected]