Shell one-liner

From Rosetta Code
Revision as of 17:08, 7 February 2009 by rosettacode>Guga360
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

Python

$ python -c 'print "Hello"' Hello

J

$ jconsole -js "exit echo 'Hello'" Hello