News : The level of daily SPAM has reached insane proportions, all registrations are now manual. I ask you to send me an e-mail (john (at) murga (dot) org), to confirm that you want me to create an account for you.

Post Reply  Post Thread 
"murgaLua -e string" in Windows and Mac
Author Message

Posts: 81
Group: Registered
Joined: May 2007
Status: Offline
Reputation: 0
Post: #1
RE: "murgaLua -e string" in Windows and Mac

Hi Mike,

first you don't need the outer quotes. lua -e var=\"string\" works. The outer quotes are only necessary if there is a space in the "-e" argument, because then it would be treated as two separate arguments and interpreted as a filename. For example lua -e var1=\"string\" var2=\"string\" would not work. But lua -e var1=\"string\" -e var2=\"string\" or lua -e "var1=\"string\" var2=\"string\"". On Linux there is also the possibility to escape/quote the space charecter ("\ ") so that the Lua interpreter doesn't see two arguments.

There is one logical error in your examples. If you want to the shell to see something like "var=\"string\"" then you have to write it the following way:

io.popen(MURGALUA.." -e \"images=\\\""..images.."\\\" "..tempfile)

You forgot to escape/quote the backslash so that it could be send literally to the shell. In your examples you quoted only the double quotes (in the Lua string) to appear in the shell. If you also quote the backslash it should work without problems.


This post was last modified: 02-22-2008 11:13 PM by Juergen.

02-22-2008 09:55 PM
Find all posts by this user Quote this message in a reply
Post Reply  Post Thread 

Messages In This Thread
RE: "murgaLua -e string" in Windows and Mac - Juergen - 02-22-2008 09:55 PM

View a Printable Version
Send this Thread to a Friend
Subscribe to this Thread | Add Thread to Favorites

Forum Jump: