Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > gnu.bash.bug > #15062 > unrolled thread
| Started by | Greg Wooledge <wooledg@eeg.ccf.org> |
|---|---|
| First post | 2019-06-19 11:08 -0400 |
| Last post | 2019-06-19 11:08 -0400 |
| Articles | 1 — 1 participant |
Back to article view | Back to gnu.bash.bug
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: How to tell Bash multiple values are success? Greg Wooledge <wooledg@eeg.ccf.org> - 2019-06-19 11:08 -0400
| From | Greg Wooledge <wooledg@eeg.ccf.org> |
|---|---|
| Date | 2019-06-19 11:08 -0400 |
| Subject | Re: How to tell Bash multiple values are success? |
| Message-ID | <mailman.459.1560957020.10840.bug-bash@gnu.org> |
On Wed, Jun 19, 2019 at 11:01:46AM -0400, Jeffrey Walton wrote: > if dnf -y update &>/dev/null > then > echo "Upgraded system" > else > echo "Failed to upgrade system" > exit 1 > fi > > The problems seems to be 0, 100 and 200 are success. When updates are > installed either 100 or 200 is returned. Confer, > https://dnf.readthedocs.io/en/latest/command_ref.html . dnf -y update >/dev/null 2>&1 rc=$? case $rc in 0|100|200) echo "Upgraded system";; *) echo "Failed up upgrade system"; exit 1;; esac
Back to top | Article view | gnu.bash.bug
csiph-web