From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5508 invoked by alias); 2 Apr 2012 20:11:21 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 16962 Received: (qmail 6730 invoked from network); 2 Apr 2012 20:11:10 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham version=3.3.2 Received-SPF: pass (ns1.primenet.com.au: SPF record at internecto.net designates 176.9.245.29 as permitted sender) X-Virus-Scanned: Debian amavisd-new at mx1.internecto.net Date: Mon, 2 Apr 2012 22:10:58 +0200 From: Mark van Dijk To: Mikael Magnusson Cc: zsh-users@zsh.org Subject: Re: Having random output from a file Message-ID: <20120402221058.04fc61a3@internecto.net> In-Reply-To: References: <20120402191933.5608a936@internecto.net> Organization: Internecto SIS X-Mailer: Claws Mail 3.8.0 (GTK+ 2.24.10; x86_64-unknown-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Mon, 2 Apr 2012 19:25:32 +0200 Mikael Magnusson wrote: > On 2 April 2012 19:19, Mark van Dijk 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. >=20 > Are you trying to reinvent fortunes? Just separate the quotes by a > line that has a % on it and you can use fortunes directly. :) >=20 Oh yes, good plan indeed. When I was reading Voltaire on wikiquotes I couldn't resist sharing his wisdom. In (t)his regard it is remarkable both how little has changed through the years and how ironic each quote appears to be under this email. :-) --=20 It is difficult to free fools from the chains they revere. -- Voltaire, 'Le d=C3=AEner du comte de Boulainvilliers' (1767)