Purpose

With no arguments, print the state of lamp 5. With an
argument, change the state of lamp 5 to "on" or "off"

Usage

lamp5 [state]

Arguments

state = action to take on lamp; legal values are

"0" or "off" = off
"1" or "on" = on

Output

The current or new state of the lamp is printed to stdout.

Exit values

0 = normal completion
1 = wrong number of arguments

Example

1) Show status of lamp 5

lamp5

2) Turn lamp 5 on

lamp5 on

3) Turn lamp 5 off

lamp5 off