On Dec 31, 2005, at 8:26 AM, Neil Bothwick wrote:
On Fri, 30 Dec 2005 18:58:17 +0100, Alexander Skwar wrote:
tar outputs to stdout by default,
Not always.
From man tar
-f, --file [HOSTNAME:]F
use archive file or device F (default "-", meaning stdin/stdout)
So "-f -" is unnecessary, but harmless.
yes, this is a style question here. I always prefer to be explicit,
where I can. Inevitably, in this business, you move on and someone
will have to come behind and understand your scripts. when you're
looking at a long line embedded in a script, it's SO much easier to
debug when the stdout is explicitly listed, than assumed. This also
allows for changes in default behavior. Such practices become
habit. But you are correct, today this -f - is unnecessary.
Tomorrow? who knows what decisions might be made regarding default
output. My point is, being precise costs nothing... nothing but a
few keystrokes.
--
Neil Bothwick
teG I sdrawkcaB eroM ehT oG I sdrawroF eroM ehT
--
gentoo-user@gentoo.org mailing list