Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Any easier way of parsing this file?
- X-seq: zsh-users 9515
- From: DervishD <zsh@xxxxxxxxxxxx>
- To: Zsh Users <zsh-users@xxxxxxxxxx>
- Subject: Re: Any easier way of parsing this file?
- Date: Wed, 19 Oct 2005 00:59:40 +0200
- In-reply-to: <20051018225336.GA957@DervishD>
- Mail-followup-to: Zsh Users <zsh-users@xxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- Organization: DervishD
- References: <20051018225336.GA957@DervishD>
Hi all :)
Just one additional note:
* DervishD <zsh@xxxxxxxxxxxx> dixit:
> # "data" contains the file data as shown above
> typeset -a otherdata
> print -n $data | while read line
> do
> case $line in
> \#*) continue;;
> (#b)SOMELABEL=([^/]##)" / "([^$'\n']##))
> mydata1="$match[1]"
> mydata2="$match[2]"
> ;;
> (#b)ANOTHERLABEL[^=]#=(*))
> otherdata+="$match"
> ;;
> *) continue ;;
> esac
> done
I've tried to do this, too:
set -- ${(j)data}
for line
...
I don't know if this is better :??
Raúl Núñez de Arenas Coronado
--
Linux Registered User 88736 | http://www.dervishd.net
http://www.pleyades.net & http://www.gotesdelluna.net
It's my PC and I'll cry if I want to...
Messages sorted by:
Reverse Date,
Date,
Thread,
Author