Copy stdin to stdout: Difference between revisions
Content added Content deleted
Not a robot (talk | contribs) (Add BCPL) |
|||
Line 64: | Line 64: | ||
Using the awk interpreter, the following command uses the pattern // (which matches anything) with the default action (which is to print the current line) and so copy lines from stdin to stdut. |
Using the awk interpreter, the following command uses the pattern // (which matches anything) with the default action (which is to print the current line) and so copy lines from stdin to stdut. |
||
<lang AWK>awk "//"</lang> |
<lang AWK>awk "//"</lang> |
||
=={{header|BCPL}}== |
|||
<lang bcpl>get "libhdr" |
|||
let start() be |
|||
$( let c = rdch() |
|||
if c = endstreamch then finish |
|||
wrch(c) |
|||
$) repeat</lang> |
|||
=={{header|C}}== |
=={{header|C}}== |