aboutsummaryrefslogtreecommitdiff
path: root/etc/eol.lua
blob: fea5da95ac9a96ac246e3444a4be1d767f7419b6 (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.canonic(marker)
while 1 do
    local chunk = io.read(4096)
    io.write(convert(chunk))
    if not chunk then break end
end