Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Having random output from a file
- X-seq: zsh-users 16960
- From: Mikael Magnusson <mikachu@xxxxxxxxx>
- To: Mark van Dijk <lists+zsh@xxxxxxxxxxxxxx>
- Subject: Re: Having random output from a file
- Date: Mon, 2 Apr 2012 19:25:32 +0200
- Cc: zsh-users@xxxxxxx
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=eQTFhxbp6XWtvTbSqtsjYvgJ8oJIvVBgQhLkCeORYv8=; b=nmfrjQVqkcAPeENnN4KFKoep6LYfS8DHimkyFOmJjVcLkgXhAWeci72+b4RBJiTc1N OK49rWFwJR2kTwth+SFPImw0uKxsKWUOKHO51fKnucQ+F8j9+kzbt32H8ZNjMvhTCvRL FiZZt9xvmlbDqE/ehOnSvktRADni3Ki0E+0oAAh5kXWrWnlo0bCWJ6A2/Eactu2EsLqJ VVqadTq0H/XQzbgji4lRSjWkHixdJZ7bVsL2rgsJuczA7sTGDqAfnM13EgUjwiBVffxP aBk5Rd86PTbU0fxQlcx6vs+6GDV/VacRJScHuW3smzBR91u7BCeJNqc4eysmO4vtzSln tlUg==
- In-reply-to: <20120402191933.5608a936@internecto.net>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <20120402191933.5608a936@internecto.net>
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