Skip to main content
added 484 characters in body
Source Link
sergiol
  • 4.2k
  • 1
  • 17
  • 37

Tcl, 8471 bytes

With renaming allowed, things get shorter:

file renameren i.txt m file renameren -force o.txt i.txt file renameren m o.txt file deletede m 

Try it online!Try it online!


# [Tcl], 84 bytes

With renaming allowed, things get shorter:

file rename i.txt m file rename -force o.txt i.txt file rename m o.txt file delete m 

Try it online!


# [Tcl], 122 bytes
set A [read [open i.txt]] puts [set i [open i.txt w]] [read [open o.txt]] puts [set o [open o.txt w]] $A close $i close $o 

Try it online!

Tcl, 84 bytes

With renaming allowed, things get shorter:

file rename i.txt m file rename -force o.txt i.txt file rename m o.txt file delete m 

Try it online!


# [Tcl], 122 bytes
set A [read [open i.txt]] puts [set i [open i.txt w]] [read [open o.txt]] puts [set o [open o.txt w]] $A close $i close $o 

Try it online!

Tcl, 71 bytes

file ren i.txt m file ren -force o.txt i.txt file ren m o.txt file de m 

Try it online!


# [Tcl], 84 bytes

With renaming allowed, things get shorter:

file rename i.txt m file rename -force o.txt i.txt file rename m o.txt file delete m 

Try it online!


# [Tcl], 122 bytes
set A [read [open i.txt]] puts [set i [open i.txt w]] [read [open o.txt]] puts [set o [open o.txt w]] $A close $i close $o 

Try it online!

deleted 624 characters in body
Source Link
sergiol
  • 4.2k
  • 1
  • 17
  • 37

Tcl, 12284 bytes

With renaming allowed, things get shorter:

set A [readfile [openrename i.txt]] putstxt [setm file irename [open-force io.txt w]] [read [open oi.txt]]txt puts [setfile orename [openm o.txt w]] $A closefile $i closedelete $om 

Try it online!Try it online!


# [Tcl], 122 bytes
set A [read [open i.txt]] puts [set i [open i.txt w]] [read [open o.txt]] puts [set o [open o.txt w]] $A close $i close $o 

Try it online!

Tcl, 122 bytes

set A [read [open i.txt]] puts [set i [open i.txt w]] [read [open o.txt]] puts [set o [open o.txt w]] $A close $i close $o 

Try it online!

Tcl, 84 bytes

With renaming allowed, things get shorter:

file rename i.txt m file rename -force o.txt i.txt file rename m o.txt file delete m 

Try it online!


# [Tcl], 122 bytes
set A [read [open i.txt]] puts [set i [open i.txt w]] [read [open o.txt]] puts [set o [open o.txt w]] $A close $i close $o 

Try it online!

deleted 624 characters in body
Source Link
sergiol
  • 4.2k
  • 1
  • 17
  • 37

Tcl, 122 bytes

set A [read [open i.txt]] puts [set i [open i.txt w]] [read [open o.txt]] puts [set o [open o.txt w]] $A close $i close $o 

Try it online!

---

Tcl, 169 bytes

set A [read [set i [open i.txt r]]] set B [read [set o [open o.txt r]]] close $i close $o puts [set i [open i.txt w]] $B puts [set o [open o.txt w]] $A close $i close $o 

Try it online!

Tcl, 122 bytes

set A [read [open i.txt]] puts [set i [open i.txt w]] [read [open o.txt]] puts [set o [open o.txt w]] $A close $i close $o 

Try it online!

---

Tcl, 169 bytes

set A [read [set i [open i.txt r]]] set B [read [set o [open o.txt r]]] close $i close $o puts [set i [open i.txt w]] $B puts [set o [open o.txt w]] $A close $i close $o 

Try it online!

Tcl, 122 bytes

set A [read [open i.txt]] puts [set i [open i.txt w]] [read [open o.txt]] puts [set o [open o.txt w]] $A close $i close $o 

Try it online!

deleted 6 characters in body
Source Link
sergiol
  • 4.2k
  • 1
  • 17
  • 37
Loading
added 543 characters in body
Source Link
sergiol
  • 4.2k
  • 1
  • 17
  • 37
Loading
Source Link
sergiol
  • 4.2k
  • 1
  • 17
  • 37
Loading