Shell One Liner

From Rosetta Code

Jump to: navigation, search

Programming Task
This is a programming task. It lays out a problem which Rosetta Code users are encouraged to solve, using languages they know.

Code examples should be formatted along the lines of one of the existing prototypes.

Execute one line of code from the shell.

[edit] OCaml

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

[edit] Perl

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

[edit] J

% jconsole -js "exit echo 'Hello'"
Hello
Personal tools