I'm learning tcl (expect) and now I came to an interesting issue. I need a command to move/rename a bunch of files with extension .status. I tried these:
spawn /bin/mv *.status some_dir
exec /bin/mv *.status some_dir
Of course, that did not work. I googled a bit and found something about glob, but it doesn't seem to work the way I want it to. If I do:
exec /bin/mv [glob *.status] somedir
mv complains that '1.status 2.status 3.status...etc.' is not a valid file. It as if the whole list of files is concatenated in a single string instead of being treated separately.
Trying to find more information via google lead me to a lot of broken and outdated links, so I'm hoping beside solving this problem, could you point me to some good online resource for tcl/expect basics and common pitfalls.
Update: Only solutions that use standard tcl and standard tools in /bin will be accepted.