how to refer to environment variable in a Terminal do script?
how to refer to environment variable in a Terminal do script?
- Subject: how to refer to environment variable in a Terminal do script?
- From: Gonzalo Castro <email@hidden>
- Date: Fri, 30 Nov 2007 15:14:37 -0500
Is there a way to refer or "pass in" a shell's environment variable
to a Terminal do script ?
For example, the toolToRun below requires the DISPLAY environment
variable to be set in the shell in which it will run. How can I pass
in the value of the calling shell's $DISPLAY variable?
#!/bin/sh
export $DISPLAY=:0.0
osascript -e 'tell app "Terminal" to activate' -e 'tell app
"Terminal" to do script "/path/to/toolToRun"'
As expected, the "export $DISPLAY=:0.0" line above doesn't work since
the calling shell is a different process than the shell spawned by
the "do script".
Thanks,
Gonzalo
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden