login
Header Space

 
 

Re: [PATCH v2] Replace instances of export VAR=VAL with VAR=VAL; export VAR

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: David Kastrup <dak@...>
Cc: Junio C Hamano <gitster@...>, Johannes Schindelin <Johannes.Schindelin@...>, Wincent Colaiuta <win@...>, Benoit Sigoure <tsuna@...>, Git Mailing List <git@...>
Date: Thursday, November 29, 2007 - 3:39 am

David Kastrup schrieb:

$ export foo="bar    baz"
$ bash
bash$ export JUNK=$foo
bash$ sh -c 'echo "$JUNK"'
bar    baz
bash$ exit
exit
$ ash
ash$ export JUNK=$foo
ash$ sh -c 'echo "$JUNK"'
bar
ash$ exit

The problem is $foo not being quoted on the RHS of the assignment of the 
export command: bash doesn't word-split, but ash does. Hence, *if*
export VAR=VAL is used, always quote VAL.

-- Hannes
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Rebase/cherry-picking idea, Wincent Colaiuta, (Mon Nov 26, 5:02 am)
Re: Rebase/cherry-picking idea, Benoit Sigoure, (Mon Nov 26, 5:32 am)
Re: Rebase/cherry-picking idea, Johannes Schindelin, (Mon Nov 26, 9:26 am)
Re: Rebase/cherry-picking idea, Wincent Colaiuta, (Mon Nov 26, 7:27 am)
Re: Rebase/cherry-picking idea, Wincent Colaiuta, (Mon Nov 26, 8:34 am)
Re: Rebase/cherry-picking idea, Johannes Sixt, (Mon Nov 26, 8:51 am)
Re: Rebase/cherry-picking idea, Junio C Hamano, (Mon Nov 26, 1:26 pm)
Re: Rebase/cherry-picking idea, Shawn O. Pearce, (Mon Nov 26, 9:08 pm)
Re: Rebase/cherry-picking idea, Junio C Hamano, (Mon Nov 26, 9:25 pm)
Re: Rebase/cherry-picking idea, Marco Costalba, (Mon Nov 26, 3:12 pm)
Re: Rebase/cherry-picking idea, Wincent Colaiuta, (Mon Nov 26, 9:15 am)
Re: Rebase/cherry-picking idea, Johannes Schindelin, (Mon Nov 26, 9:41 am)
Re: Rebase/cherry-picking idea, Wincent Colaiuta, (Mon Nov 26, 9:55 am)
Re: Rebase/cherry-picking idea, Junio C Hamano, (Wed Nov 28, 4:06 am)
Re: Rebase/cherry-picking idea, Wincent Colaiuta, (Wed Nov 28, 4:52 am)
Re: Rebase/cherry-picking idea, Junio C Hamano, (Wed Nov 28, 5:47 am)
Re: Rebase/cherry-picking idea, Wincent Colaiuta, (Wed Nov 28, 6:04 am)
Re: Rebase/cherry-picking idea, Junio C Hamano, (Wed Nov 28, 2:44 pm)
[PATCH] Replace instances of export VAR=VAL with VAR=VAL; ex..., Johannes Schindelin, (Wed Nov 28, 9:57 am)
Re: [PATCH] Replace instances of export VAR=VAL with VAR=VAL..., Johannes Schindelin, (Wed Nov 28, 10:29 am)
Re: [PATCH] Replace instances of export VAR=VAL with VAR=VAL..., Johannes Schindelin, (Wed Nov 28, 3:03 pm)
Re: [PATCH] Replace instances of export VAR=VAL with VAR=VAL..., Johannes Schindelin, (Wed Nov 28, 7:08 pm)
[PATCH v2] Replace instances of export VAR=VAL with VAR=VAL;..., Johannes Schindelin, (Wed Nov 28, 11:56 am)
Re: [PATCH v2] Replace instances of export VAR=VAL with VAR=..., Johannes Schindelin, (Wed Nov 28, 7:05 pm)
Re: [PATCH v2] Replace instances of export VAR=VAL with VAR=..., Johannes Sixt, (Thu Nov 29, 3:39 am)
Re: [PATCH] Replace instances of export VAR=VAL with VAR=VAL..., Nguyen Thai Ngoc Duy, (Wed Nov 28, 10:19 am)
Re: [PATCH] Replace instances of export VAR=VAL with VAR=VAL..., Johannes Schindelin, (Wed Nov 28, 10:27 am)
Re: [PATCH] Replace instances of export VAR=VAL with VAR=VAL..., Nguyen Thai Ngoc Duy, (Wed Nov 28, 10:27 am)
Re: [PATCH] Replace instances of export VAR=VAL with VAR=VAL..., Johannes Schindelin, (Wed Nov 28, 10:36 am)
Re: Rebase/cherry-picking idea, Benoit Sigoure, (Mon Nov 26, 8:39 am)
speck-geostationary