#!/usr/bin/env wish

text .t -width 80 -height 25 -wrap word -yscrollcommand ".s set"
scrollbar .s -orient vertical -command ".t yview"

pack .t -side left -fill both -expand 1
pack .s -side left -fill y

bind . <Key-q> exit

proc loadFile file {
  .t delete 1.0 end
  set f [open $file]
  while {![eof $f]} {
    .t insert end [read $f 1000]
  }
  close $f
}

loadFile $argv

