At 12:49 +1000 8/1/05, John Horner wrote, in part:
>Output of this script with BBEDit's "Run In Terminal":
>-----
>LOGNAME == myusername
>HOST == jh.my.work
>GROUP == myusername
>SHLVL == 2
>PWD == /private/tmp/501/Cleanup At Startup

Note the SHLVL which is incremented each time a shell invokes another shell.  
BBEdit has been known to make a copy of a "script" in /tmp/ which it passes to 
Terminal, or something else, for execution. There may be an added shebang line 
at the front. In fact there needs to be because your script is obviously perl. 
Note the PWD variable; look there for such a file.

In AppleScript after 10.3 the do shell script command always takes one to "sh". 
A shebang line at the start of the script to be "done" can point to bash or 
tcsh but the SHLVL will get increased as a daughter process is started up by sh.

Note that /usr/bin/sh is a copy of /usr/bin/bash and not, as is common in the 
Linux world, a hard link to bash. In compatibility mode - sh - bash does not do 
all of the fancy things it does when called as bash. A similar arrangement 
holds for csh and tcsh.

>PATH == /bin:/sbin:/usr/bin:/usr/sbin:/opt/local/bin

It is curious that PATH contains /opt/local/bin. I don't think OS neXt ever 
does that by itself. Darwin Ports and Fink might create such things but, of 
course, you or your employer can do it too. Are you involved with Apple's X11?

Do experiment with BBEdit worksheets. They will provide yet another option for 
running the script - just select and enter.
-- 

--> Life begins at ovulation. Ladies should endeavor to get every young life 
fertilized. <--

Reply via email to