Posted to tcl by mjanssen at Thu Nov 08 23:08:23 GMT 2007view raw

  1. #! /bin/sh
  2. # the next line restarts using wish \
  3. exec wish "$0" "$@"
  4. set file /tmp/TV-Viewer/channels.txt
  5. set f [open $file r]
  6. set i 1
  7. while {[gets $f line]!=-1} {
  8. foreach {kanal channel} [split $line] {
  9. set kanale($i,kanal) $kanal
  10. set kanale($i,channel) $channel
  11. }
  12. incr i
  13. }
  14.  
  15. parray kanale