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: Gabriel Dos Reis
Subject: Re: [Axiom-developer] Testing build-improvements
Date: 22 Nov 2006 19:41:47 +0100

"Page, Bill" <address@hidden> writes:

[...]

| > | 
| > |               chunk=`echo -n "$arg"`
| > 
| > this one is one needed.
| >
| 
| That is not what you wrote originally in your patchlet.

I think I wrote:

!          if test -n "$arg"; then
!              chunk=`echo -n $arg`


|  
| > | 
| > | 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.

Yes, I know $chunkis just a variable; that the behaviour is odd,
probably.  Can I do something about it?  Yes.  Is the work-around
yucky?  Yes.

| 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.

-- Gaby




reply via email to

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