put shell() and escaping quotes, how to do this?
Peter Alcibiades
palcibiades-first at yahoo.co.uk
Wed Dec 30 12:16:54 EST 2009
How do you put quoted strings into a shell command?
As in, for instance,
put shell("echo -e [quoted string] > [some raw printer]")
I have tried using double quotes, which the compiler won't accept, and
single quotes, which do not seem to be passed through. This is once again
in pursuit of sending hex characters to a port, so the command from the
shell would be:
echo -e "\x1C\x70x1"
which works just fine, but when sent to the printer using put shel(), it
prints the characters which are supposed to be sending a control message.
The solution I have found is to use cat > file, which works. But the other
should work as well surely?
Peter
More information about the use-livecode
mailing list