Posted to tcl by Saedelaere at Thu Nov 08 23:05:54 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 i 1
  6. while {[gets $file line]!=-1} {
  7. foreach {kanal channel} [split $line] {
  8. set kanale($i,kanal) $kanal
  9. set kanale($i,channel) $channel
  10. incr i
  11. }
  12. }
  13.  
  14. This is my code
  15.  
  16. now i get the following error:
  17.  
  18. saedelaere@elkbase-desktop:~> /home/saedelaere/Programme/Skripte/Programmierung/variablen.tcl
  19. Error in startup script: can not find channel named /tmp/TV-Viewer/channels.txt
  20. while executing
  21. "gets $file line"
  22. (file "/home/saedelaere/Programme/Skripte/Programmierung/variablen.tcl" line 1)
  23.