Posted to tcl by aspect at Fri Jan 27 13:41:19 GMT 2017view raw
- package require tar
- file mkdir temp.[pid]
- cd temp.[pid]
- proc writefile {name text} {
- set fd [open $name w]
- puts $fd $text
- close $fd
- }
- writefile 2 "number two"
- writefile 02 "zero-two"
- tar::create t.tar {2 02}
- puts [tar::get t.tar 02]
- puts [tar::get t.tar 0b10]
- cd ..
- file delete -force temp.[pid]
- # number two
- #
- # number two