Copy stdin to stdout: Difference between revisions
→{{header|Binary Lambda Calculus}}
(→{{header|Ruby}}: Add Ruby) |
|||
(5 intermediate revisions by 3 users not shown) | |||
Line 94:
=={{header|Brainf***}}==
<syntaxhighlight lang="brainf***">,[.,]</syntaxhighlight>
=={{header|Binary Lambda Calculus}}==
As explained on https://www.ioccc.org/2012/tromp/hint.html, `cat' is the 4-bit program
<pre>0010</pre>
in bit-wise BLC, or any one of the 16 characters in the ASCII range from space to slash
<pre> !"#$%&'()*+,-./</pre>
in byte-wise BLC.
=={{header|C}}==
Line 371 ⟶ 383:
}
}</syntaxhighlight>
===io.Copy===
<syntaxhighlight lang="go">
package main
import (
"io"
"os"
)
func main() {
io.Copy(os.Stdout, os.Stdin)
}
</syntaxhighlight>
=={{header|Groovy}}==
Line 707 ⟶ 733:
Bytes are read from stdin and written to stdout until the return key is pressed.
<syntaxhighlight lang="
Stdin.isRaw = true // prevents echoing to the terminal
|