View Full Version : [iTCL] could u make ascii2bin accept lists
b>d>>s
01-21-2004, 07:12 AM
?
atm, it just accepts lines separated by \n
just a thought ..
Ofloo
05-07-2004, 04:56 PM
set filename "your file to convert"
set rfile [open $filename r]
fconfigure $rfile -translation crlf
set rdata [read $rfile]
close $rfile
set wfile [open $filename w]
fconfigure $wfile -translation crlf
puts $wfile "$rdata"
close $wfile
that should take care of it i think ..
neoxed
05-07-2004, 05:17 PM
No, he was talking about the userfile and groupfile function, not reading from files.
[userfile ascii2bin ...] and [groupfile ascii2bin ...]
http://www.ioftpd.com/board/showthread.php?s=&threadid=1775
Could easily be done by:
userfile open "someuser"
userfile lock
set newufile ""
lappend newufile "credits 0 0 0 0 0 0 0 0 0 0"
lappend newufile "tagline Unknown"
userfile ascii2bin [join $newufile "\n"]
userfile unlock
ioFTPD would then replace the 'credits' and 'tagline' portion of the userfile with the new values, leaving the rest as it previously was.
vBulletin® v3.8.11 Alpha 3, Copyright ©2000-2024, vBulletin Solutions, Inc.