• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: using a shell variable in an osascript line?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: using a shell variable in an osascript line?


  • Subject: Re: using a shell variable in an osascript line?
  • From: Skeeve <email@hidden>
  • Date: Sun, 01 Mar 2009 20:22:55 +0100

LuKreme schrieb:
I think we decided that passing the argv was the way to go, though I've not actually checked if the the text is preserved exactly (including spacing, tabs, CRLFs, etc).
I'm sure it won't, if you have the value in a variable. The variable assignment will remove linefeeds. But if you supply it directly, linefeeds remain:

$ osascript -e '
on run argv
return item 1 of argv
end' 'test1
test2
test3'

gives:

test1
test2
test3

_______________________________________________
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
References: 
 >Re: using a shell variable in an osascript line? (From: "Mark J. Reed" <email@hidden>)
 >Re: using a shell variable in an osascript line? (From: LuKreme <email@hidden>)

  • Prev by Date: Re: using a shell variable in an osascript line?
  • Next by Date: Re: using a shell variable in an osascript line?
  • Previous by thread: Re: using a shell variable in an osascript line?
  • Next by thread: Re: using a shell variable in an osascript line?
  • Index(es):
    • Date
    • Thread