-----BEGIN PGP SIGNED MESSAGE-----

rpjday wrote:

>just as a philosophical comment, the first way is of course the
>preferred way.  as more than one unix book has pointed out,
>whenever you see a "pipeline" of the form:
>
>  $ cat (file) | cmd ...
>
>you can almost always rewrite it as:
>
>  $ cmd ... < (file)
>
>as far as i know, there is no reason to use the pipe if your
>only purpose is to "cat" a file into it.

I usually find it easier to remember best-practices if I know the
reason, so perhaps we should also point out that we do this because
the former construct uses more resources than the latter.  Try running
both constructs as arguments to "time", and see the difference.
It might only be microseconds, but that can add up to a wallop in a
big job.

- -d

- -- 
David Talkington
http://www.spotnet.org

PGP key: http://www.prairienet.org/~dtalk/dt000823.asc



-----BEGIN PGP SIGNATURE-----
Version: PGP 6.5.8
Comment: Made with pgp4pine 1.75-6

iQEVAwUBOttdCL1ZYOtSwT+tAQGTUgf+JVENkykDpWbPSeZcBBy9B/rxkNZKJFWv
UMuEoN1KW89CBUwIokzU8QcVsUbcV82Twa+lAFmeni7iiHbx+X58MPSFzqZEublT
YneV7fbMjdKlVq6bEEdknUL9fRl78MUvAWBt0OhU0AVxzPZL8/eg6UtRzhd0KcRf
/e2MvDsmTbH8/ZbK/+nfkFYduWWLRZ7+S0h3ppMHj9CU3OIRSHX9pailrJZnSHxc
zGQZrKNbhu9Auh3NBNBW/4UVphb9WyJqlvQPRNwOq0y1c6imJqnh2Qqx2fGEiM74
tk8PIDBvMWgtYO1tIHx5MivmHH5LcmW/tmSJ83iMpghUiTCV7arDhg==
=6Cur
-----END PGP SIGNATURE-----




_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list

Reply via email to