Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: String splitting
- X-seq: zsh-users 12671
- From: evgen <drujebober@xxxxxxxxx>
- To: zsh-users@xxxxxxxxxx <zsh-users@xxxxxxxxxx>
- Subject: Re: String splitting
- Date: Sun, 2 Mar 2008 23:31:03 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:subject:message-id:in-reply-to:references:organization:x-mailer:mime-version:content-type:content-transfer-encoding; bh=Hc8oDg4YIiyQLrsb63cj+78gkoj7Zzh+rSBVxeU73Ns=; b=MLTUn4t2pZKPFHVSk2f05uFk3BzRlOEYnioyndn02l3pQe36vGQowUCK0cnQ57k0Q2thijouFWAy3m8dgr94gs6Jro3FulFGt85ZV8HUY4jY4S8IjJA+F1bGeExsUnzev+CBTYy7JLQcwliYqvWABh2joa4QNwZLLkc+2IHTkhU=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:subject:message-id:in-reply-to:references:organization:x-mailer:mime-version:content-type:content-transfer-encoding; b=NL3B6ILTOusj6e8pqLYpR0AvKZfXJNBS+XBAI2MEv3v8KMUdS7XKevlPhVZZqjV/BIqemmbTvbMKh7csfnjBOazxrwseZqH9qhnqGw1eEj2h/4B6VS7A4EQ8W4gFPnVrdFIx0ecUikk4trL2VA7zwA3Uya2o8jp3MH4/FJOOUr8=
- In-reply-to: <20080302212258.GA19206@xxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- Organization: home
- References: <20080302212258.GA19206@xxxxxxxxxxxxxxxxxxx>
$ FOO="/a/long/path/to/file" ; FOO=(${(s:/:)FOO}) ; echo $FOO
a long path to file
> Hi, I want to split a string '/a/long/path/to/file' to an array:
>
> ( a long path to file )
>
> What would be the most zsh style way for that?
>
> Thanks!
>
> Przemek
Messages sorted by:
Reverse Date,
Date,
Thread,
Author