On Thursday 09 November 2006 12:25, Greg Freemyer wrote:
All,
I've just had a Windows users/programmer ask me a question that's new to me.
Apparently in Windows if you have a command prompt the file extension associations work.
Thus if you have a .html file in the current directory, you can just type the name of the file and hit return. The command interpreter figures out there is an application associated with and launches the associated file. In this case an Internet Browser gets launched.
Hmm...never tried that. Yes, it works. I also tried it with .doc (Word), .txt (EditPad), and .xls (Excel) files. Interesting.
In linux I know files can start with #!/bin/sh etc. and cause various interpreters to be launched. Is there a way to cause an html file to auto launch a browser. And if so is there a way to do it if you don't know the full path of the browser. ie. we just want to say, shell launch default Internet Browser.
You apparently cannot simply type file.html and have it launch Firefox or Konqueror or Nautilus. However, you can type - for example - firefox file.html and it will launch. -- kai ponte www.perfectreign.com