Purpose
With no arguments, print the state of lamp 2. With an
argument, change the state of lamp 2 to "on" or "off"
Usage
lamp2 [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 2
lamp2
2) Turn lamp 2 on
lamp2 on
3) Turn lamp 2 off
lamp2 off