Add cat utility

This commit is contained in:
joachimschmidt557 2019-03-11 09:27:49 +01:00
parent c4a8616344
commit 381e3737da
2 changed files with 11 additions and 1 deletions

10
cat.nim Normal file
View file

@ -0,0 +1,10 @@
import cligen, os, streams
import common
proc main(files:seq[string]) =
for file in files:
var s = newFileStream(file, fmRead)
while not s.atEnd:
write(stdout, s.readChar)
dispatch(main)