zsh-users
 help / color / mirror / code / Atom feed
From: "S. Cowles" <scowles@ckhb.org>
To: meino.cramer@gmx.de
Cc: zsh-users@zsh.org
Subject: Re: splitting and assigning
Date: Sat, 24 May 2014 20:20:47 -0700 (PDT)	[thread overview]
Message-ID: <alpine.DEB.2.03.1405241607010.16498@ckhb.org> (raw)
In-Reply-To: <20140524054323.GB4047@solfire>

On Sat, 24 May 2014, meino.cramer@gmx.de wrote:

> Date: Fri, 23 May 2014 22:43:23
> From: meino.cramer@gmx.de
>
> 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


      parent reply	other threads:[~2014-05-25  3:32 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-24  5:43 meino.cramer
2014-05-24 14:27 ` Kurtis Rader
2014-05-24 15:12 ` Eric Cook
2014-05-25  3:20 ` S. Cowles [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.DEB.2.03.1405241607010.16498@ckhb.org \
    --to=scowles@ckhb.org \
    --cc=meino.cramer@gmx.de \
    --cc=zsh-users@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).