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 21:03:05 +0100
LuKreme schrieb:
I have a shell variable that I set to the output of a shell command
VAR1=`tail -1 /var/log/maillog`
and then I use VAR1 in the shell script for various things.
Then, at some point, I want to use that VAR1 in an osascript line,
maybe something like:
osascript -e "display dialog $VAR1"
Try this:
osascript -e 'on run argv
display dialog (item 1 of argv)
end run' "$VAR1"
_______________________________________________
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