File: toupper.lua

package info (click to toggle)
nmap 6.47-3
  • links: PTS, VCS
  • area: main
  • in suites: jessie-kfreebsd
  • size: 44,736 kB
  • sloc: ansic: 89,743; cpp: 62,412; sh: 19,492; python: 17,323; xml: 11,413; perl: 2,529; makefile: 2,502; yacc: 608; lex: 469; asm: 372; java: 45
file content (14 lines) | stat: -rw-r--r-- 209 bytes parent folder | download | duplicates (11)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
--Emulates the RFC 862 echo service, behaving like Unix's "cat" tool.

while true do

    data = io.stdin:read(1)

    if data == nil then
        break
    end

    io.write(data:upper())
    io.flush()

end