Re: What am I doing wrong with System_exec?
- Posted by tiger0581 Sep 06, 2009
- 1100 views
jeremy said...
jimcbrown said...
tiger0581 said...
Hello. What is wrong with the following line? error_code=system_exec("say "&text,2) Text is the variable with text I want to pass to the Mac OS 10 "say" command.
Sh gives me the following error when I run the Euphoria program with that line: sh: -c: line 1: syntax error: unexpected end of file Thanks.
What is the contents of text?
Probably it has a quote or brace in it that needs to be escaped.
This is my guess to. As a quick test do:
sequence text = "hello" ? system_exec("say " & text, 2)
See if that works. If so, escaping is indeed your problem.
Jeremy
Thanks. Escaping was the problem. The text is from an HTML page, so it had a quotation mark.