Shell one-liner: Difference between revisions
Content added Content deleted
(fixed algol) |
|||
Line 5: | Line 5: | ||
=={{header|ALGOL 68}}== |
=={{header|ALGOL 68}}== |
||
{{works with|ALGOL 68G|Any - tested with release mk15-0.8b.fc9.i386}} |
{{works with|ALGOL 68G|Any - tested with release mk15-0.8b.fc9.i386}} |
||
<lang> |
|||
a68g -e 'print(("Hello",new line))' |
a68g -e 'print(("Hello",new line))' |
||
</lang> |
|||
=={{header|OCaml}}== |
=={{header|OCaml}}== |
Revision as of 21:59, 7 February 2009
Shell one-liner
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.
Execute one line of code from the shell.
ALGOL 68
<lang> a68g -e 'print(("Hello",new line))' </lang>
OCaml
<lang> $ ocaml <(echo 'print_endline "Hello"') Hello </lang>
Perl
<lang> $ perl -e 'print "Hello\n"' Hello </lang>
PHP
<lang> $ php -r 'echo "Hello\n";' Hello </lang>
Python
<lang> $ python -c 'print "Hello"' Hello </lang>
J
<lang> $ jconsole -js "exit echo 'Hello'" Hello </lang>