Posted to tcl by aspect at Thu Nov 10 01:41:17 GMT 2011view pretty
#!/usr/bin/tclsh # # test.bin is made from: # ( ls /usr/share/doc/tcl8.6 ; echo END ; tar -C /usr/share/doc/tcl8.6 -cz . ) > test.bin # # why the need to [seek $f [tell $f]]? What should I be doing instead? # (eliminate that line and see tar error) # set f [open test.bin] while {[set l [gets $f]] != "END"} {} chan configure $f -encoding binary -translation binary # needing to do this is a bit odd seek $f [tell $f] exec tar -tzv <@ $f close $f