Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo


ls glob fails from program

  • the command: "ls dummy.*.s", works fine if typed from the mged command line. But, any ls command, with an asterisk,
    fails when run from in a tcl program. I tried a number of variations, and none worked. See the test program, below.
    I have a workaround to explicitly list all of the possible file names that are expected, but this largely
    defeats the purpose of glob.

    Is this a bug or am I missing something?



    proc globTst {} {
        variable glob_compat_mode
        puts $glob_compat_mode
        ls dummy.*.s ; # BAD
        #ls "dummy.*.s" ; # BAD
        #set lsCmd "ls dummy.*.s"
        #eval $lsCmd ; # BAD


    for the program to work, create some files to match: "dummy.*.s", or change "dummy.*.s" to match files you have.