X

Running scripts: a follow-up

Running scripts: a follow-up

CNET staff
Regarding our previous item on running Unix shell scripts in Mac OS X:

Using .MacOSX/environment.plist BBEdit can run shell, perl, python, etc. scripts directly. While editing a script, just select Run from the #! menu. However, by default a user's environment variables are not passed to BBEdit, which can be a real headache. BareBones kindly sent me the answer: Using Property List Editor (or any text editor if you would rather), create a file called .MacOSX/environment.plist. Environment variables listed there will be seen by Mac OS X applications." The file goes in your home directory (see Technical Q&A 1067 for more details). The fact that it starts with a period means it will be invisible. Note: See Apple Technical Note 2013 for info on how to write a plist file.

See also this page for more on using and troubleshooting BBEdit.

Script tutorial Gary Elshaw adds: "I recently wrote a couple of shell scripts and a small tutorial. I'm a total novice on using the command line and thought this information might be useful to others who have thus far been reluctant to use the Terminal in OS X."