On Fri, Aug 01, 2003 at 12:15:18AM +0100, Jim Cheetham wrote: > On Thu, Jul 31, 2003 at 08:26:10PM +1200, Barry wrote: > > % qiv myphoto.jpg also displays myphoto > > but > > % qiv *.jpg fails with the msg 'couldnt execute "qiv > > *.jpg, no such > > file or directory' > > > > Do I need to escape the '*' somehow? > > Yep, you need to use filename globbing (which understands the wildcards > you're trying) otherwise the * character is interpreted literally. > > Try something like qiv [glob *.jpg]
Should have tested that ... The return list from glob is presented as a single object to the caller, rather than a set of separate items. You'll have to use eval to break the whole thing back out from a list into separate elements ... eval exec ls [glob m*] Don't forget that at the tclsh, you pobably have auto_noexec unset, which means if you enter an un-recognised command, it'll be treated as a potential system command. Within a program, you'll be unable to say "eval qiv [glob *.jpg]", instead use "eval exec qiv [glob *.jpg]" -jim
