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: matt...@infracaninophile.co.uk               Kent, CT11 9PW

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to