On Sunday, September 8, 2002, at 05:58 PM, John Delacour wrote:
> At 4:33 pm -0600 8/9/02, Charles Albrecht wrote: > > >> `open -a "Microsoft Excel" $foo` >> >> (or whatever the Excel executable happens to be called on the target >> system) >> >> But some versions of Excel (mine is ancient - YMMV with something newer >> than v.4) might refuse to open files with an unfamiliar type. > > Aha! That's the sort of thing I needed, and it does work with my Excel > 1998 running in Classic. > > Even this works: ! > > open -a "SimpleText" junk.txt > > So at last Application names are cached somewhere with their paths. And > about time too. Where? > from man open... "The open command opens a file (or a directory), just as if you had dou- ble-clicked the file's icon. If no application name is specified, the default application as determined via Finder is used to open the speci- fied files." my emphasis... "as determined via Finder" So, in fact, you don't even have to do... `open -a "Microsoft Excel" $foo` because... `open foo.xls` would work just as well, because the Finder knows that .xls has to be opened with Excel. -- Puneet Kishor [EMAIL PROTECTED]