Re: read shell into property, pass to do shell script?
Re: read shell into property, pass to do shell script?
- Subject: Re: read shell into property, pass to do shell script?
- From: Steve Mills <email@hidden>
- Date: Fri, 3 Oct 2003 10:10:27 -0500
On Friday, Oct 3, 2003, at 09:42 US/Central, Star wrote:
set myShellStuff to read alias myShellStuffPath from 1 to (get eof
alias myShellStuffPath)
end if
set myShellStuff to myShellStuff as string
do shell script (myShellStuff & " " & ?
quoted form of POSIX path of TestFile & " " & ?
quoted form of POSIX path of LogFile)
result = sh test_file log_file
So, if I go and run this shell script from the terminal, and I
don't pass the arguments of "test_file" & "log_file" I will get
same result, or error. That's why I assumed the property
was working fine.
Could it be that the text of the shell script has carriage returns in
it? From the couple tests I did, that'll screw it up.
do shell script ("ls" & return & "ls")
-->sh: ls
-->ls: command not found
Changing it to this works:
do shell script ("ls" & (ASCII character 10) & "ls")
Maybe the text of myShellStuff has a CR or LF at the end?
Steve Mills
Drummer, Mac geek
http://sjmills5.home.mchsi.com/
_______________________________________________
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.