Hello world/Line printer: Difference between revisions

Content deleted Content added
Petelomax (talk | contribs)
Line 593: Line 593:
Assuming lpr is a command that prints to a printer:
Assuming lpr is a command that prints to a printer:
<lang Salmon>`echo "Hello World!" | lpr`;</lang>
<lang Salmon>`echo "Hello World!" | lpr`;</lang>

=={{header|Rust}}==
<lang rust>use std::fs::OpenOptions;
use std::io::Write;

fn main() {
let file = OpenOptions.write(true).open("/dev/lp0").unwrap();
file.write(b"Hello, World!").unwrap();
}</lang>



=={{header|Scala}}==
=={{header|Scala}}==