aboutsummaryrefslogtreecommitdiff
path: root/etc/eol.lua
blob: 6b2a8a93276275b2b6456b1bf1c79f448032099b (plain)
1
2
3
4
5
6
7
8
9
marker = {['-u'] = '\10', ['-d'] = '\13\10'}
arg = arg or {'-u'}
marker = marker[arg[1]] or marker['-u']
local convert = socket.mime.normalize(marker)
while 1 do
    local chunk = io.read(1)
    io.write(convert(chunk))
    if not chunk then break end
end