File: n.tcl

package info (click to toggle)
tcllib 2.0%2Bdfsg-4
  • links: PTS
  • area: main
  • in suites: sid, trixie
  • size: 83,572 kB
  • sloc: tcl: 306,798; ansic: 14,272; sh: 3,035; xml: 1,766; yacc: 1,157; pascal: 881; makefile: 124; perl: 84; f90: 84; python: 33; ruby: 13; php: 11
file content (15 lines) | stat: -rw-r--r-- 243 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# -*- tcl -*-

set kc {}

foreach line [split [read stdin] \n] {
    if {$line eq {}} continue    
    lassign $line key code
    dict set kc $key $code
}

foreach k [lsort -dict [dict keys $kc]] {
    puts [list $k [dict get $kc $k]]
}

exit