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

Re: Any easier way of parsing this file?



    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