[Top] [All Lists]

Re: [Nmh-workers] Quoting for test commands

2013-11-14 07:45:18
(Each "word" interpreted as an individual argument).  I've played
around with single quotes, double quotes, backslashes, and clearly I'm
missing something.  I guess it's weird interaction between parameter
substitution and command substitution that I'm not smart enough to
figure out.  Help?

You are probably better building up a sequence of shell variables that
you can eventually eval.  But it's hard (for me, at least) to understand
the exact semantics you want.

I think Ralph and you have given me the necessary clue, but here's what
I'm interested in:

% fmttest -raw -format %(unquote) "Mr. Foo Bar"

argv[0] = fmttest
argv[1] = -raw
argv[2] = -format
argv[3] = %(unquote)
argv[4] = Mr. Foo Bar

What was happening was that I was actually getting:

argv[0] = fmttest
argv[1] = -raw
argv[2] = -format
argv[3] = %(unquote)
argv[4] = "Mr.
argv[5] = Foo
argv[6] = Bar"

I think adding the eval like Ralph had suggested is the trick; thanks to
you both!


Nmh-workers mailing list

<Prev in Thread] Current Thread [Next in Thread>