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

Re: Having random output from a file



On 2 April 2012 19:19, Mark van Dijk <lists+zsh@xxxxxxxxxxxxxx> wrote:
> Hello,
>
> I have a file that contains quotes that are separated by a blank line. Can zsh
> help me to randomly output a quote from that file or should I use awk, or grep
> or so? Should the first quote be prefaced by a blank line?
>
> Thanks for helping me,
> -Mark.

Are you trying to reinvent fortunes? Just separate the quotes by a
line that has a % on it and you can use fortunes directly. :)

-- 
Mikael Magnusson



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