On 1. Nov 2006, at 17:40, Dirk van Oosterbosch, IR labs wrote:
[...] if I try to make it into a oneliner the variable replacement fails: osascript -e 'tell app "Safari" to open location "$IR_LABSITE_TESTURL"'
In single quotes, the shell does not expand variables. It does it for double quotes, so try instead:
osascript -e "tell app "Safari" to open location "$IR_LABSITE_TESTURL""
- Can a command in one bundle access the support folder of a
different bundle?
Not without a hardcoded path, so basically no.
Or can a command from a different bundle be triggered from the current? I'd like to use the apachectlUsingKeychain.sh shell script that comes with the Apache bundle, but is there a way to access that bundle's support folder? Or do I have to copy the script to the support folder of my own bundle?
I’d recommend copying the script.
- What does the '-ne' in 'if [[ $(ps -xp $PPID|wc -l) -ne 2 ]];
then' do?
You can do ‘man test’ to see what the options do. -ne is “not equal”.
So it runs ps to ask for processors with the process ID being that of our parent ($PPID) which would be TextMate’s. Then it counts the number of matches (wc -l) and sees if that is two.
I guess something simpler would be:
if ps -cp $PPID | grep -sq TextMate; then …