From: Christian Neukirchen <chneukirchen@gmail.com>
To: zsh-users@zsh.org
Subject: Re: Having random output from a file
Date: Tue, 03 Apr 2012 20:08:39 +0200 [thread overview]
Message-ID: <87sjgk3cyg.fsf@gmail.com> (raw)
In-Reply-To: <20120403102304.GA12996__48421.5200799101$1333452094$gmane$org@matzbach>
Eike von Seggern <eikevons@yahoo.de> writes:
> I use this alias to get a random line from a file (so it would only work
> in your case if each quote is on a single line)
>
> alias rndline='sort -R | head -1'
>
> But it's not using any zsh magic.
If you depend on GNU coreutils anyway, you can just do "shuf -n1".
--
Christian Neukirchen <chneukirchen@gmail.com> http://chneukirchen.org
prev parent reply other threads:[~2012-04-03 18:24 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
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 [this message]
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=87sjgk3cyg.fsf@gmail.com \
--to=chneukirchen@gmail.com \
--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).