nmh-workers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Nmh-workers] Quoting for test commands


From: Ken Hornstein
Subject: Re: [Nmh-workers] Quoting for test commands
Date: Thu, 14 Nov 2013 08:44:49 -0500

>> (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!

--Ken



reply via email to

[Prev in Thread] Current Thread [Next in Thread]