Hello world/Line printer
Hello world/Line printer
You are encouraged to solve this task according to the task description, using any language you may know.
You are encouraged to solve this task according to the task description, using any language you may know.
Cause a line printer attached to the computer to print a line containing the message Hello World!
BASIC
<lang qbasic>LPRINT "Hello World!"</lang>
Batch File
<lang dos>ECHO Hello world!">PRN</lang>
Tcl
On Unix only: <lang tcl>exec lp << "Hello World!"</lang> or <lang tcl>set f [open |lp w] puts $f "Hello World!" close $f</lang> On Windows only: <lang tcl>set f [open prn w] puts $f "Hello World!" close $f</lang>
UNIX Shell
<lang bash>echo 'Hello World!'|lp</lang>