ports/63222: [patch] Remove useless use of cat 5/5
Ulrich Spoerlein
q at uni.de
Mon Feb 23 21:50:11 UTC 2004
The following reply was made to PR ports/63222; it has been noted by GNATS.
From: Ulrich Spoerlein <q at uni.de>
To: Michael Nottebrock <michaelnottebrock at gmx.net>
Cc: freebsd-gnats-submit at FreeBSD.org
Subject: Re: ports/63222: [patch] Remove useless use of cat 5/5
Date: Mon, 23 Feb 2004 22:44:15 +0100
On Mon, 23.02.2004 at 21:19:25 +0100, Michael Nottebrock wrote:
> I am not going to start another lengthy debate in this PR by asking you in
> just what way "useless use of cat" sets a "bad" example. Instead I'll cut it
> short: What you're trying to do to is enforce your (and possibly some other
> people's as well) idea of good _style_. In other words, the decision of using
> stdin or not is primarily a matter of _taste_.
I don't want to force style on anyone. I thought that "useless use of
cat" was considered a bad style all around. I can't find any discussion
in the mail archives but was under the impression that it is generally
not well accepted.
There are also some occurences where just these cat|sed uses have been
eliminated. See
http://freebsd.rambler.ru/srch?old_q=useless+use+of+cat&words=%22useless+use+of+cat%22&where=7
> This isn't about bugs or bad examples, it's about bikeshedding. Everyone can
> do a substitution with sed, and everyone can use redirections. Debating the
> best way to do it serves no purpose. This PR and your other four do not
> either. Please request to close them. Set the "good example" in your own
> ports.
I myself am using 'cat file | sed/awk/...' quite often on the _command_
line_, because I know the filename first, then I think about how to
accomplish a given thing (Should I use awk or grep or sed?). Writing the
command in the way the data gets processed is more intuitive.
IMHO this point does not apply to scripts/makefiles, where you normally
aren't writing the commands but you read (and try to understand) them.
If everyone on FreeBSD is happy with cat|sed then just close the PRs and
forget the whole incident. You might want to commit PR 63220 though,
since the maintainer has approved the changes.
Ulrich Spoerlein
--
PGP Key ID: F0DB9F44 Get it while it's hot!
PGP Fingerprint: F1CE D062 0CA9 ADE3 349B 2FE8 980A C6B5 F0DB 9F44
I abhor a system designed for the "user", if that word is a coded
pejorative meaning "stupid and unsophisticated". -- Ken Thompson
More information about the freebsd-ports-bugs
mailing list