Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: splitting and assigning



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