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


Click here to return to the '10.6: Easily manage the built-in web server with AppleScript' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.6: Easily manage the built-in web server with AppleScript
Authored by: arcticmac on Dec 14, '09 08:36:47AM

An easier way that would just open them in whatever your default text editor happens to be (defined by LaunchServices?) would be

do shell script "open -e /etc/php.ini"

[ Reply to This | # ]
10.6: Easily manage the built-in web server with AppleScript
Authored by: tedw on Dec 14, '09 09:16:59AM
Be careful with this: open -e /etc/php.ini will actually open the file in TextEdit, not TextWrangler, and TextEdit can save the file in rich format (styled text rather than plain text) which will make the php.ini file unreadable by the system. Make sure you're saving as plain text.

Personally, I've added /etc as a folder in TextWrangler's open/save dialogs so that I can access any files I need there directly. The script approach isn't half bad, though.

[ Reply to This | # ]

Re: 10.6: Easily manage the built-in web server with AppleScript
Authored by: Uncle Asad on Dec 14, '09 01:30:53PM

Or, if you’ve installed TextWrangler’s command-line tools, you can use "edit" instead of "open -e" and avoid the guesswork of having to interact with LaunchServices :P



[ Reply to This | # ]
10.6: Easily manage the built-in web server with AppleScript
Authored by: jweber on Dec 14, '09 03:29:50PM

That will work as long as your text editor can save files that you don't have write-permission for. TextWrangler can do this, but TextEdit can't.



[ Reply to This | # ]