Re: passing shell script arguments?
Re: passing shell script arguments?
- Subject: Re: passing shell script arguments?
- From: Andrew Oliver <email@hidden>
- Date: Thu, 02 Oct 2003 13:12:47 -0700
You haven't provided enough information to definitively answer your
question.
For a start, what is 'myShellCode' defined as?
Are you specifying full path names to your files? Do the filenames contain
spaces?
Does it work if you use 'quoted form of' the paths? This is the safest way
to pass filenames to shell scripts.
Andrew
:)
On 10/2/03 12:48 PM, "Star" <email@hidden> wrote:
>
Hello,
>
>
I have a rather lengthy shell script that acts upon a file path and posts
>
results to a log file. I have been able to read this large shell script into a
>
property and save it inside my applescript that way. The problem I am having
>
though is that the arguments I am passing to the shell script are not being
>
passed right. I am trying many logical ways that do not seem to work. The
>
shell understands the shell script because it is asking for the arguments, it
>
does not like the way I am passing them. After searching the list archives I
>
am more confused than before as to what to try next. Please help, I'm close
>
but stumped here. . .
>
>
The syntax is like this:
>
>
>
-- ATTEMPT 1
>
-- created posix path to file as variable and passed like this...
>
-- set DoScript to (myShellCode & " \"" & TestFile & " \"" & SR_FileLog) as
>
string
>
= Result (sh: test_file log_file)
>
>
-- ATTEMPT 2
>
-- here I tried to make the posix path on the fly from the file reference like
>
this....
>
--do shell script (myShellCode & space & POSIX path of TestFile & space &
>
POSIX path of SR_FileLog)
>
= Result (sh: test_file log_file)
>
>
-- ATTEMPT 2
>
-- created posix path to file as variable and passed like this...
>
-- do shell script (myShellCode & " " & TestFile & " " & FileLog)
>
= Result (sh: test_file log_file)
>
>
Thanks, Patrick
>
_______________________________________________
>
applescript-users mailing list | email@hidden
>
Help/Unsubscribe/Archives:
>
http://www.lists.apple.com/mailman/listinfo/applescript-users
>
Do not post admin requests to the list. They will be ignored.
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.