summaryrefslogtreecommitdiff
path: root/man/on_ac_power.1
blob: 4d29c1e62aa9c263c5b882e6f0bbe1fe3aa4d939 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
.\"                                      Hey, EMACS: -*- nroff -*-
.\" First parameter, NAME, should be all caps
.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
.\" other parameters are allowed: see man(7), man(1)
.TH ON_AC_POWER 1 "April 2005" "" ""
.\" Please adjust this date whenever revising the manpage.
.\"
.\" Some roff macros, for reference:
.\" .nh        disable hyphenation
.\" .hy        enable hyphenation
.\" .ad l      left justify
.\" .ad b      justify to both left and right margins
.\" .nf        disable filling
.\" .fi        enable filling
.\" .br        insert line break
.\" .sp <n> insert n+1 empty lines
.\" for manpage-specific macros, see man(7)
.SH NAME
on_ac_power \- test whether the computer is running on line power
.SH SYNOPSIS
.B on_ac_power
.SH DESCRIPTION
The command succeeds (status 0) if the system is using line power
and fails (status other than 0) otherwise.
It is designed to be easy to use in shell scripts.
.SH OPTIONS
None.
.SH "EXIT STATUS"
.br
.nf
\fB0\fR (true)    System is on line power
\fB1\fR (false)   System is not on line power
\fB255\fR (false) Power status could not be determined
.SH NOTES
Absence of any batteries is taken to mean that the system is on line power.