[SSFR] Re: [SSFR] Re: [SSFR] [zsh] role guillemets doubles dans les expansions ?

[ Thread Index | Date Index | More debianworld.org/shellscript-fr Archives ]


On 2005-06-13 13:49:31 +0200, Vincent Lefevre wrote:
> Pour foreach l (  ${(f)$(< comprendre )} ) { print $l }, je suppose
> que le (f) a pour premier effet de transformer le tableau en chaîne
> comme avec:
> 
>   foreach l ( ${(j: :)$(< comprendre )} ) { print $l }

D'ailleurs, il y a un exemple, toujours dans la page man zshexpn(1):

  As an example of the rules for word splitting and joining, suppose $foo
  contains the array `(ax1 bx1)'.  Then

  ${(s/x/)foo}
         produces the words `a', `1 b' and `1'.

-- 
Vincent Lefèvre <vincent@xxxxxxxxxx> - Web: <http://www.vinc17.org/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.org/blog/>
Work: CR INRIA - computer arithmetic / SPACES project at LORIA



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/