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
mikshaw
Senior Member
****


Posts: 522
Group: Registered
Joined: Apr 2007
Status: Offline
Reputation: 5
Post: #1
RE: "murgaLua -e string" in Windows and Mac

Quote:
The outer quotes are only necessary if there is a space in the "-e" argument

That's a strong possibility, though. The script checks the location of itself and uses that directory as the value of images. In windows it is almost guaranteed that there will be a space in there if the user has the script somewhere in his home directory ("C:\Documents and Settings\username\", for example). I've always hated this aspect of Windows, but it's there so I have to deal with it. Perhaps just having quotes around the value of the variable is enough to tell the shell that images="C:\Documents and Settings\username\" is a single parameter? In other words, would this be passed correctly:
murgaLua -e images="C:\Documents and Settings\username\" scriptname
EDIT: no, that doesn't even work in Linux. The entire string after -e must be passed as a single string regardless of whether or not there are spaces. murgaLua -e variable="a_string_without_spaces" didn't even work.

Quote:
You forgot to escape/quote the backslash so that it could be send literally to the shell.

I'd actually thought about this briefly, but it seemed that if it works in Linux then maybe it's not an issue. After seeing your example of the way double quotes nested within single quotes don't work in Windows, I believe you're correct.
Unfortunately escaping escapes is something that has always bothered me as well....mostly just because it looks messy and is sometimes hard for me to follow.

I'm hoping that the double brackets will work instead of needing to escape quotes, mainly because it is the cleaner method in my opinion.

This post was last modified: 02-23-2008 02:30 AM by mikshaw.

02-23-2008 01:10 AM
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 - mikshaw - 02-23-2008 01:10 AM

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

Forum Jump: