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

Re: Fun zsh trick for today



> hosts=(${${${${(f)"$(<$HOME/.ssh/known_hosts)"}:#[^0-9]*}%%\ *}%%,*})

This has the opposite effect as desired (i.e., it returns an array
containing only those entries beginning with digits).  This does what I
want (except for omitting things like 3stop.com):

hosts=(${${${${(f)"$(<$HOME/.ssh/known_hosts)"}:#[0-9]*}%%\ *}%%,*})



Messages sorted by: Reverse Date, Date, Thread, Author