Hi!
I would like to test some files in a directory and extract all those that have _README in the end
I did something like
foreach $f [lsort -dictionary [glob file join $dirname *]]]
{
puts $f -> gives something like /dsdsd/dsdsd/sdsd/hhj_README...
set a [regexp {*(/*README) } $f] -> I want to test _README at the end of each $f
if {$a==1}
{
puts "match"
}
}
I have tried string match as well without luck. Can someone please help me find the right syntax.
Thanks,
Fabien
I would like to test some files in a directory and extract all those that have _README in the end
I did something like
foreach $f [lsort -dictionary [glob file join $dirname *]]]
{
puts $f -> gives something like /dsdsd/dsdsd/sdsd/hhj_README...
set a [regexp {*(/*README) } $f] -> I want to test _README at the end of each $f
if {$a==1}
{
puts "match"
}
}
I have tried string match as well without luck. Can someone please help me find the right syntax.
Thanks,
Fabien