On Jan 19, 2012, at 10:49 PM, Tom Browder wrote:

> On Thu, Jan 19, 2012 at 11:36, Tom Browder <[email protected]> wrote:
> ...
>> In regress/mged.sh there is this line which seems to cause the problem:
>> 
>>  cmds="`$MGED -c mged.g ? 2>&1 | grep -v Using`"
>> 
>> When I change it to this (protect ? in single quotes) the mged-regress works:
>> 
>>  cmds="`$MGED -c mged.g '?' 2>&1 | grep -v Using`"
> 
> Can someone try my fix and see if it causes a problem?  I don't know
> why it works and the other doesn't, but maybe it works ANYWAY for all
> and is acceptable for a check in.
> 
> I defer to the shell expert, Sean.

You have a single-character file in your directory, probably named 't'.

The question mark is a special glob character matching a single character.  
Nobody's ever happened to have a file with a single character in their 
directory, so it's always gotten passed to mged as a literal '?'.  You hit a 
double-whammy.  With the filename match on the glob and a valid command at 
that, it's invoking "mged -c mged.g t", getting a table of contents, and 
processing the resulting object list as commands.

Your fix to wrap it in single quotes is the right fix.

Cheers!
Sean


------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
BRL-CAD Developer mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-devel

Reply via email to