From: Mikael Magnusson <mikachu@gmail.com>
To: Mark van Dijk <lists+zsh@internecto.net>
Cc: zsh-users@zsh.org
Subject: Re: Having random output from a file
Date: Mon, 2 Apr 2012 19:25:32 +0200 [thread overview]
Message-ID: <CAHYJk3Qktt0G_NhuLQ1yq8Q3RXeH6MV1vQss5ADjBY2Gcbg5qg@mail.gmail.com> (raw)
In-Reply-To: <20120402191933.5608a936@internecto.net>
On 2 April 2012 19:19, Mark van Dijk <lists+zsh@internecto.net> 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
next prev parent reply other threads:[~2012-04-02 17:25 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-02 17:19 Mark van Dijk
2012-04-02 17:25 ` Mikael Magnusson [this message]
2012-04-02 20:10 ` Mark van Dijk
2012-04-03 10:23 ` Eike von Seggern
[not found] ` <20120403102304.GA12996__48421.5200799101$1333452094$gmane$org@matzbach>
2012-04-03 18:08 ` Christian Neukirchen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAHYJk3Qktt0G_NhuLQ1yq8Q3RXeH6MV1vQss5ADjBY2Gcbg5qg@mail.gmail.com \
--to=mikachu@gmail.com \
--cc=lists+zsh@internecto.net \
--cc=zsh-users@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).