Shell one-liner

From Rosetta Code
Revision as of 17:09, 7 February 2009 by rosettacode>Guga360 (Added XML Reading, Shell One Liner and Find unimplemented tasks‎ to Python.)
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

<lang> $ ocaml <(echo 'print_endline "Hello"') Hello </lang>

Perl

<lang> $ perl -e 'print "Hello\n"' Hello </lang>

Python

<lang> $ python -c 'print "Hello"' Hello </lang>

J

<lang> $ jconsole -js "exit echo 'Hello'" Hello </lang>