Adrian Perez |
|
i = 1; for line in io.readlines() do print(i .. ": ", line); i = i+1; end
for (int i=1, b[100];;i++) printf("%d: %s\n",i,gets((char*)b));
while 1 do i=(i or 0)+1 print(""..i..": "..io.read()) end or for i,ln in function(s,i) return i+1,""..i..": "..io.read() end,nil,1 do print(ln) end
main()
function and include stdio.h
... Maybe I often worry too much about code correctness and maybe that script was not a good example after all :P -- Adrian
while(<>) {print(++$i.": ".$_)}
awk '{print NR, $0}' -