• 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: Copy folder shell scripting
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Copy folder shell scripting


  • Subject: Re: Copy folder shell scripting
  • From: Bruce Robertson <email@hidden>
  • Date: Thu, 24 Apr 2008 12:59:46 -0700

> On Apr 24, 2008, at 7:35 AM, Mark J. Reed wrote:
>
>> You can put any kind of interpreter name after the #! and it will
>> work,. for instance
>>
>> #!/usr/bin/osascript
>> path to me
>>
>> works (at least on Leopard; a niggling memory is telling me that you
>> might have to add an option after the /osascript to get it to work on
>> earlier versions of OS X).
>
> Actually, it just doesn't work in earlier versions.  It's possible to
> fake it, though; here's one way:
>
> #!/bin/sh
> osascript - "$@" <<EOF
> your script here
> EOF

I tried that like this. I know this particular example is kinda going the
long way around but I'm just trying to see how it works. This is on 10.4.11.


#!/bin/sh
osascript - "$@" <<EOF
do shell script "ls"
EOF

And got this result in Terminal but I don't know what workspacegns means.

[ip133:~] bruce% /Users/bruce/Desktop/osaText.sh
workspacegns


Done like this, I get the expect result, a file on the desktop.

#!/bin/sh
osascript - "$@" <<EOF
do shell script "ls > ~/desktop/files.txt"
EOF

 _______________________________________________
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

  • Follow-Ups:
    • Re: Copy folder shell scripting
      • From: Christopher Nebel <email@hidden>
    • Re: Copy folder shell scripting
      • From: "Mark J. Reed" <email@hidden>
References: 
 >Re: Copy folder shell scripting (From: Christopher Nebel <email@hidden>)

  • Prev by Date: So simple yet---I need help
  • Next by Date: Re: So simple yet---I need help
  • Previous by thread: Re: Copy folder shell scripting
  • Next by thread: Re: Copy folder shell scripting
  • Index(es):
    • Date
    • Thread