put shell() and escaping quotes, how to do this?
m.schonewille at economy-x-talk.com
Wed Dec 30 12:23:30 EST 2009
echo "hi how are \"you\""
--> hi how are "you"
Economy-x-Talk Consulting and Software Engineering
Full PayPal integration and automation in web site or (Revolution/
SuperCard/other) software. Contact me for a quote before 1 Jan 2010
and we'll charge (reduced) 2009 prices.
Op 30 dec 2009, om 18:16 heeft Peter Alcibiades het volgende geschreven:
> 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
> in pursuit of sending hex characters to a port, so the command from
> 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
> The solution I have found is to use cat > file, which works. But
> the other
> should work as well surely?
More information about the Use-livecode