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>

next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enig9976880ABA0AD7D1E409BF71
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

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.
>=20
> For example it's easier to edit=20
>=20
>      cat file | foo
>=20
> into=20
>   =20
>      cat file | bar | foo
> or   cat file? | foo
>=20
> than editing=20
>=20
>      foo < file
>=20
> into
>=20
>      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

--=20
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


--------------enig9976880ABA0AD7D1E409BF71
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----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-----

--------------enig9976880ABA0AD7D1E409BF71--



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