# open files for reading and writing
set read_file [open "pit1.str" "r"]
set write_file [open "new1.str" "w"]

# read the first line
gets $read_file line

# loop for each line in the file
while {![eof $read_file]} {

  # write the line to the backup file
  puts $write_file "$line"

  # read the next line
  gets $read_file line
}

# close the files
close $read_file
close $write_file
