set x 0
# glob replaces ls
foreach dir [glob -nocomplain *] {
# Regexp replaces grep. Note: feel free to combine the tests into a
# single if. I used two if statements merely to clarify line-by-line
# functionallity.
if {[regexp {^[0-9]*$} $dir] > 0} {
if {$dir > $x} {set x $dir}
}
}
--
Robert Heller --
978-544-6933 /
hel...@deepsoft.com
Deepwoods Software --
http://www.deepsoft.com/
() ascii ribbon campaign -- against html e-mail
/\
www.asciiribbon.org -- against proprietary attachments