Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 06 Jan 2011 09:49:40 +0000
From:      Matthew Seaman <m.seaman@infracaninophile.co.uk>
To:        freebsd-questions@freebsd.org
Subject:   Re: a perl question
Message-ID:  <4D259034.6020805@infracaninophile.co.uk>
In-Reply-To: <20110105221538.26daeb0d@gumby.homeunix.com>
References:  <117654.42578.qm@web121409.mail.ne1.yahoo.com>	<AANLkTinEksoXQAA4ZAziE59h%2BLRTxSgSy2WZy6UaQne%2B@mail.gmail.com>	<4D231CB7.2060902@teambox.fr> <86pqsc3774.fsf@red.stonehenge.com>	<20110105062401.GB74123@guilt.hydra>	<20110105160514.GA94459@libertas.local.camdensoftware.com> <20110105221538.26daeb0d@gumby.homeunix.com>

index | next in thread | previous in thread | raw e-mail

[-- Attachment #1 --]
On 05/01/2011 22:15, RW wrote:
> Personally I find that using cat makes things simpler and less error
> prone when reusing  pipelines in shell history.
> 
> For example it's easier to edit 
> 
>      cat file | foo
> 
> into 
>    
>      cat file | bar | foo
> or   cat file? | foo
> 
> than editing 
> 
>      foo < file
> 
> into
> 
>      bar < file | foo
> or   cat file? | foo

Little known factoid -- shell redirections can occur *anywhere* on the
command line.

% > foo cat
abcdefghijklmnopqrstuvwxyz
% < foo tr 'a-z' 'm-za-l'
mnopqrstuvwxyzabcdefghijkl

	Cheers,

	Matthew

-- 
Dr Matthew J Seaman MA, D.Phil.                   7 Priory Courtyard
                                                  Flat 3
PGP: http://www.infracaninophile.co.uk/pgpkey     Ramsgate
JID: matthew@infracaninophile.co.uk               Kent, CT11 9PW


[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.16 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk0lkDwACgkQ8Mjk52CukIyiTwCgkPJtqjah8kNr++5uZ7TSfibc
TpgAnjvj5xljgJNKcMx+snTkhsN4wyzh
=0Qle
-----END PGP SIGNATURE-----
help

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4D259034.6020805>