Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: field splitting
- X-seq: zsh-users 24804
- From: Pier Paolo Grassi <pierpaolog@xxxxxxxxx>
- To: Roman Perepelitsa <roman.perepelitsa@xxxxxxxxx>
- Subject: Re: field splitting
- Date: Wed, 22 Apr 2020 19:46:47 +0200
- Cc: Mikael Magnusson <mikachu@xxxxxxxxx>, Zsh-Users List <zsh-users@xxxxxxx>
- In-reply-to: <CAN=4vMr_Bd+TzfVE1Q5iWQZouMKhbHiA-2zp3tTxAM_P92KLYw@mail.gmail.com>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- List-unsubscribe: <mailto:zsh-users-unsubscribe@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <CAP+y1xB2m980w0s1N2SdLuf9ibdcLUUJgTaq1hEM0d6Eq9VXCA@mail.gmail.com> <CAHYJk3SBrkdRHWSm=UM=de9+jSHCgpiGE-Q+0xf6OE3P0xQA5A@mail.gmail.com> <CAP+y1xDGKs45QE6fjxgrfentSfpxR+ZMfqPff=mtFp-atqT3bw@mail.gmail.com> <CAN=4vMr_Bd+TzfVE1Q5iWQZouMKhbHiA-2zp3tTxAM_P92KLYw@mail.gmail.com>
zsh -fc 'line="abcd"; echo ${${(As: :)line}[1]} $ZSH_VERSION'
a 5.1.1
Pier Paolo Grassi
linkedin: https://www.linkedin.com/in/pier-paolo-grassi-19300217
founder: https://www.meetup.com/it-IT/Machine-Learning-TO
Il giorno mer 22 apr 2020 alle ore 19:18 Roman Perepelitsa <
roman.perepelitsa@xxxxxxxxx> ha scritto:
> On Wed, Apr 22, 2020 at 7:13 PM Pier Paolo Grassi <pierpaolog@xxxxxxxxx>
> wrote:
> >
> > doesn't seem to work
> >
> > line="abcd"
> > echo -n ${${(As: :)line}[1]}
> > a
>
> Curious. How about this?
>
> zsh -fc 'line="abcd"; echo ${${(As: :)line}[1]} $ZSH_VERSION'
>
>
> Roman.
>
Messages sorted by:
Reverse Date,
Date,
Thread,
Author