a perl question
Matthew Seaman
m.seaman at infracaninophile.co.uk
Thu Jan 6 09:49:52 UTC 2011
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 at infracaninophile.co.uk Kent, CT11 9PW
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 267 bytes
Desc: OpenPGP digital signature
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20110106/f08f7862/signature.pgp
More information about the freebsd-questions
mailing list