diff options
Diffstat (limited to 'etc')
-rw-r--r-- | etc/eol.lua | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/etc/eol.lua b/etc/eol.lua new file mode 100644 index 0000000..234cc4d --- /dev/null +++ b/etc/eol.lua | |||
@@ -0,0 +1,9 @@ | |||
1 | marker = {['-u'] = '\10', ['-d'] = '\13\10'} | ||
2 | arg = arg or {'-u'} | ||
3 | marker = marker[arg[1]] or marker['-u'] | ||
4 | local convert = socket.code.canonic(marker) | ||
5 | while 1 do | ||
6 | local chunk = io.read(4096) | ||
7 | io.write(convert(chunk)) | ||
8 | if not chunk then break end | ||
9 | end | ||