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

Re: can I access output of locate?



On Mar 13, 10:01pm, ZyX wrote:
}
} Now locate something with a space. This variant works only as long as
} you are certain you have no characters from IFS in a file name.
}
} Thus you should use a=( ${(0)"$(locate -0 my.cnf)"} ).

Or

    locate -0 my.cnf | IFS=$'\0' read -A a

which might be slightly faster if there are a LOT of hits from locate.



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