Mailing List ArchiveSupport open source code!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]Shell script Q
- To: tlug@example.com
- Subject: Shell script Q
- From: Frank BENNETT <bennett@example.com>
- Date: Wed, 9 Aug 2000 11:36:14 +0900
- Content-Transfer-Encoding: 7bit
- Content-Type: text/plain; charset=iso-2022-jp
- Reply-To: tlug@example.com
- Resent-From: tlug@example.com
- Resent-Message-ID: <uSaN1D.A.IwB.bXMk5@example.com>
- Resent-Sender: tlug-request@example.com
We have some APC power supplies here, and I want our Linux servers to take advantage of them. I fetched the upsd package, which looks like it will do the trick. The upsd daemon accepts an option that causes it to exit immediately with a return status that indicates what it deduced from the serial line it was pointed at -- power low, no cable found, etc. So, I thought, all I need to do is catch the return value, run it through a case statement, and I'm ready to set things up. But, uh, then I realized that I don't know how to catch a return value (as opposed to standard output). The only shell operators I know of that handle return values are && and ||, and these are not going to help me distinguish between return values of 100 and 101. I know there's a way to do this, but I have been through the Bash man page and I can't figure it out. Can anyone help? Thanks in advance, ---- -x80 Frank G Bennett, Jr @@ Faculty of Law, Nagoya Univ () email: bennett@example.com Tel: +81[(0)52]789-2239 ()
- Follow-Ups:
- Shell script A
- From: "Stephen J. Turnbull" <turnbull@example.com>
- Re: Shell script Q
- From: "Thomas O'Dowd" <tom@example.com>
Home | Main Index | Thread Index
- Prev by Date: RE: How to use Japanese True Type fonts?
- Next by Date: Shell script A
- Prev by thread: Re: How to use Japanese True Type fonts?
- Next by thread: Shell script A
- Index(es):
Home Page Mailing List Linux and Japan TLUG Members Links