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

Re: Replacing sed for zsh portability



    Hi all :)

    Sorry for self replying... again.

 * DervishD <zsh@xxxxxxxxxxxx> dixit:
>     Another question, related to this. It seems that the X|Y glob
> operator doesn't work left-to-right, but shortest-first. If I do
> this:
> 
>     print ${line#\#(<=|=>| |)}

    I've tried to be a bit less stupid and use the correct form:

    print ${line##\#(<=|=>| |)}

    Obviously that zsh will use the shortest-first match if
instructed to do so. Sorry for the noise, I didn't noticed I was
using "#" instead of "##".

    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