|
|
|
|
|
by zzo38computer
2306 days ago
|
|
Here is another implementation using Node.js (although it does not explicitly check for EOF): require("fs").createReadStream(process.argv[2]).pipe(process.stdout)
Here is a implementation in PostScript (it does explicitly check for EOF, and specifically deals with one byte at a time): /o (%stdout) (w) file def
ARGUMENTS 0 get (r) file
{
dup read {
o exch write
} {
quit
} ifelse
} bind loop
(I have no GitHub account. But if the owner of that repository want to add, they can add what I have; I post this message (and all of my other messages on Hacker News) to public domain.) |
|
$ gs cat.ps helloworld.txt
Error: /undefined in ARGUMENTS ...
Thanks!