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

Re: Per line ${..//..}



    Hi Peter :)

 * Peter Stephenson <pws@xxxxxxx> dixit:
> DervishD wrote:
> >     Unfortunately the original data is not in an array :( Will this
> > work?:
> > 
> >     olddata=(${(f)olddata))
> >     olddata=(${olddata:#...})
> 
> Yes, you should be able to combine them along the lines of
> 
>      ${${(f)olddata}:#...}

    Thanks Peter, this works perfectly. Now I'm doing this:

    olddata=(${${(f)olddata}:#...})

    I still do the array conversion because this makes easier to find
individual lines afterwards (and I can refer to them by number, which
is something I want).

    Thanks! :)

    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