axiom-developer
[Top][All Lists]
Advanced

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

RE: [Axiom-developer] Testing build-improvements


From: Page, Bill
Subject: RE: [Axiom-developer] Testing build-improvements
Date: Wed, 22 Nov 2006 13:28:18 -0500

On Wednesday, November 22, 2006 12:50 PM Gaby wrote:

> | > !              chunk=$arg

Why does this fail? What is the value of $chunk?

> | > ...
> | > !              chunk=`echo -n $arg`
> |

Is this one missing quotes or does it not matter?

> Bill Page wrote:
> | What shell actually requires such an awkward construction?
> | Of if you wish why not write:
> | 
> |               chunk="$arg"
> | 
> | or even better :-)
> 
> the trouble with this is that is does not work -- I spent a
> considerable amount of time on this quote micmac. :-(

Does not work is too vague.

Why does it fail? What is the result value of $chunk?

> 
> | 
> |               chunk=`echo -n "$arg"`
> 
> this one is one needed.
>

That is not what you wrote originally in your patchlet.
 
> | 
> | But I think "quotes" are only needed on argments to external
> | commands like 'test', not on variable assignments or echo.
> 
> Well, my shell (Zsh) is unhappy with the form chunk="$arg", when
> chunk is used later with -R.
> 

That's very odd. $chunk is just a variable. To use it with -R
as a parameter to notangle I would recommend the following quotes:

  notangle "-R$chunk"

because notangle is an external command.

All of these forms behave identically in my tests using bash
provided that all parameters to external commands are properly
quoted.

Perhaps "3.1: Why does `$var' where `var="foo bar"' not do what
I expect?" in

 http://www.faqs.org/faqs/unix-faq/shell/zsh

might help?

I fear you are heading for "quote hell" if you do not have the
exact semantics of the shell for which you are designing the
scripts.

Regards,
Bill Page.




reply via email to

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