Shell one-liner

From Rosetta Code
Revision as of 12:16, 26 August 2008 by rosettacode>Blue Prawn (New page: {{task}} Execute one line of code from the shell. =={{header|OCaml}}== % ocaml <(echo 'print_endline "Hello"') Hello =={{header|Perl}}== % perl -e 'print "Hello\n"' Hello)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Task
Shell one-liner
You are encouraged to solve this task according to the task description, using any language you may know.

Execute one line of code from the shell.

OCaml

% ocaml <(echo 'print_endline "Hello"') Hello

Perl

% perl -e 'print "Hello\n"' Hello