Re: using a shell variable in an osascript line?
Re: using a shell variable in an osascript line?
- Subject: Re: using a shell variable in an osascript line?
- From: Skeeve <email@hidden>
- Date: Fri, 27 Feb 2009 22:00:26 +0100
Matthew Smith schrieb:
I am on Leopard.
Strange.
You need the variable to be defined otherwise it will return nothing.
I'm not stupid ;-)
osascript -e 'return system attribute "TMPDIR"'
Returns a value for me.
/var/folders/9A/9AtEPahnGSquLXI8HpyKG++++TI/-Tmp-/
It's not sufficient to have the variable defined!
$ echo "echo: $var1" ; osascript -e 'return "osa: " & system attribute
"$var1"'
echo: xx "aa" cc
osa:
You need to export it:
$ export var1 ; echo "echo: $var1" ; osascript -e 'return "osa: " &
system attribute "var1"'
echo: xx "aa" cc
osa: xx "aa" cc
But I'm on Tiger.
_______________________________________________
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