Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: splitting and assigning
- X-seq: zsh-users 18851
- From: "S. Cowles" <scowles@xxxxxxxx>
- To: meino.cramer@xxxxxx
- Subject: Re: splitting and assigning
- Date: Sat, 24 May 2014 20:20:47 -0700 (PDT)
- Cc: zsh-users@xxxxxxx
- In-reply-to: <20140524054323.GB4047@solfire>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <20140524054323.GB4047@solfire>
On Sat, 24 May 2014, meino.cramer@xxxxxx wrote:
Date: Fri, 23 May 2014 22:43:23
From: meino.cramer@xxxxxx
I want to split each line into two parts:
the checksum and the path/file and assign each part
to a separate variable.
another method: if your data is in an array, cycle through the array.
ds=( ${(f)${"$(< your_data_file )"}} )
for l in ${ds} ; do e=( ${=l} ) ; echo "e1: ${e[1]}, e2: ${e[2]}" ; done
Messages sorted by:
Reverse Date,
Date,
Thread,
Author