Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'More robust with | sed -e s/.command$//' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
More robust with | sed -e s/.command$//
Authored by: jzsimon on Mar 21, '03 11:58:44AM

This method is actually more robust. Firstly it doesn't require the .command extension but does allow it. Secondly, there are filenames which will not work without the .command extension, because the shell script file takes on the same extension as the last file in the filename, which can change the filetype as far as the OS is concerned.

As an example, try the file name "open /Applications/Preview.app.command". It works great with this more robust method. Then try the file name "open /Applications/Preview.app". This fails miserably because the OS interprets the file as an application, suppresses the .app extension, and then never lets you put it back.



[ Reply to This | # ]