home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / unix / shell / 3240 < prev    next >
Encoding:
Text File  |  1992-07-31  |  1.9 KB  |  53 lines

  1. Newsgroups: comp.unix.shell
  2. Path: sparky!uunet!sun-barr!decwrl!csus.edu!netcomsv!mork!messina
  3. From: messina@netcom.com (Tony Porczyk)
  4. Subject: Re: Sort problem . .
  5. Message-ID: <rsqmjvp.messina@netcom.com>
  6. Date: Fri, 31 Jul 92 13:26:58 GMT
  7. Organization: Messina Software
  8. References: <33pmg <1992Jul31.000822.13317@convex.com> <0fqm1cp.messina@netcom.com> <1992Jul31.115559.11391@convex.com>
  9. Lines: 42
  10.  
  11. Mr. etxmesa@eos.ericsson.se (Michael Salmon) writes:
  12. > I have seen very many flexible solutions to problems, many of them
  13. > were even good solutions, for a while at least. The usual result is
  14. > that some time in the future the flexible solution breaks and someone
  15. > has to do it right.
  16.  
  17. Mr. Tom Christiansen <tchrist@convex.COM> writes:
  18.  
  19. > Hacking on source is almost always a solution that will come back to
  20. > haunt you.  Sometimes things are so broken you have to fix them, but
  21. > if you just want to munge the output, heroic measures are overkill.
  22.  
  23. Hm.  Okay, maybe we look at it differently.  I find modifying source
  24. to suit my particular need and then saving another version faster and
  25. *much* easier and more understandable for the future than writing
  26. wrappers that *should* *usually* work.  I don't have to remember to
  27. wrap the stuff as I use it because it does exactly what I want.  
  28. I don't consider it a heroic solution, I consider it an easy one. 
  29.  
  30. Maybe that would appeal to you more then:
  31.  
  32. Add one more option, say, "-h" for "header non-sortable", make it
  33. FALSE by default, TRUE if invoked, and change
  34.  
  35. printf("%s COMMAND\n", hdr);
  36.  
  37. to
  38.  
  39. if(hdr_non_sort)
  40.         fprintf(stderr, "%s COMMAND\n", hdr);
  41. else
  42.         fprintf(stdout, "%s COMMAND\n", hdr);
  43.  
  44. It shouldn't take longer than 10-15 minutes to have it completely
  45. implemented.  Isn't it simpler than writing wrappers and remembering
  46. what needs to be piped through what?  No functionality is lost, some
  47. is added. 
  48.  
  49. t.
  50.  
  51. Ps.: I am too agreeable, I know, don't feel quite myself today...
  52.  
  53.