Purpose

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

Usage

lamp3 [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 3

lamp3

2) Turn lamp 3 on

lamp3 on

3) Turn lamp 3 off

lamp3 off