Re: Copy folder shell scripting
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