Article View: comp.unix.shell
Article #241Re: Sort problem . .
From: Tony Porczyk
Date: Fri, 31 Jul 1992 13:26
Date: Fri, 31 Jul 1992 13:26
41 lines
2001 bytes
2001 bytes
Mr. etxmesa@eos.ericsson.se (Michael Salmon) writes:
> I have seen very many flexible solutions to problems, many of them
> were even good solutions, for a while at least. The usual result is
> that some time in the future the flexible solution breaks and someone
> has to do it right.
Mr. Tom Christiansen <tchrist@convex.COM> writes:
> Hacking on source is almost always a solution that will come back to
> haunt you. Sometimes things are so broken you have to fix them, but
> if you just want to munge the output, heroic measures are overkill.
Hm. Okay, maybe we look at it differently. I find modifying source
to suit my particular need and then saving another version faster and
*much* easier and more understandable for the future than writing
wrappers that *should* *usually* work. I don't have to remember to
wrap the stuff as I use it because it does exactly what I want.
I don't consider it a heroic solution, I consider it an easy one.
Maybe that would appeal to you more then:
Add one more option, say, "-h" for "header non-sortable", make it
FALSE by default, TRUE if invoked, and change
printf("%s COMMAND\n", hdr);
to
if(hdr_non_sort)
fprintf(stderr, "%s COMMAND\n", hdr);
else
fprintf(stdout, "%s COMMAND\n", hdr);
It shouldn't take longer than 10-15 minutes to have it completely
implemented. Isn't it simpler than writing wrappers and remembering
what needs to be piped through what? No functionality is lost, some
is added.
t.
Ps.: I am too agreeable, I know, don't feel quite myself today...
Technical Details
Message-ID:
<rsqmjvp.messina@netcom.com>Path:
arc1-ca.pugleaf.net!sparky!uunet!sun-barr!decwrl!csus.edu!netcomsv!mork!messinaReferences:
<33pmg <1992Jul31.000822.13317@convex.com> <0fqm1cp.messina@netcom.com> <1992Jul31.115559.11391@convex.com>Show Full Headers
Complete Article Headers
Newsgroups: comp.unix.shell Path: arc1-ca.pugleaf.net!sparky!uunet!sun-barr!decwrl!csus.edu!netcomsv!mork!messina From: messina@netcom.com (Tony Porczyk) Subject: Re: Sort problem . . Message-ID: <rsqmjvp.messina@netcom.com> Date: Fri, 31 Jul 92 13:26:58 GMT Organization: Messina Software References: <33pmg <1992Jul31.000822.13317@convex.com> <0fqm1cp.messina@netcom.com> <1992Jul31.115559.11391@convex.com> Lines: 42