File: toupper.lua

package info (click to toggle)
nmap 7.40-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 50,080 kB
  • ctags: 26,777
  • sloc: ansic: 98,862; cpp: 64,063; python: 17,751; sh: 14,584; xml: 11,448; makefile: 2,635; perl: 2,585; yacc: 660; lex: 457; asm: 372; java: 45; objc: 43
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