One Liners are an abridged one-line version of a multi-line script.
Originally, a one-liner program was textual input to the command-line of an operating system shell that performs some function in just one line of input. The one-liner can be
- an expression written in the language of the shell;
- the invocation of an interpreter together with program source for the interpreter to run;
- the invocation of a compiler together with source to compile and instructions for executing the compiled program.
Certain dynamic scripting languages such as AWK, sed, and Perl have traditionally been adept at expressing one-liners. Shell interpreters such as Unix shells or Windows PowerShell allow for the construction of powerful one-liners.
The use of the phrase one-liner has been widened to also include program-source for any language that does something useful in one line.
Find more information at: