home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / unix / shell / 3185 < prev    next >
Encoding:
Text File  |  1992-07-29  |  819 b   |  30 lines

  1. Newsgroups: comp.unix.shell
  2. Path: sparky!uunet!decwrl!csus.edu!netcomsv!mork!messina
  3. From: messina@netcom.com (Tony Porczyk)
  4. Subject: Re: Sort problem . .
  5. Message-ID: <zynm!yh.messina@netcom.com>
  6. Date: Wed, 29 Jul 92 16:35:53 GMT
  7. Organization: Messina Software
  8. References: <1992Jul27.123415.977@leland.Stanford.EDU>
  9. Lines: 19
  10.  
  11. peer@ccrma.stanford.edu (Peer Landa) writes:
  12.  
  13. >I'm trying to list & sort all my processes by memory use:
  14. >alias  pss  ' ps uax | sort -nr +3'
  15. >It works fine except for that the "title line" also gets sorted and therefore  
  16. >appears at the bottom . . any idea to avoid this ?
  17.  
  18. Seems to me like the simplest solution would be to change line 725 in ps.c
  19. (maybe somewhere else in your source) from:
  20.  
  21. printf("%s COMMAND\n", hdr);
  22.  
  23. to:
  24.  
  25. fprintf(stderr, "%s COMMAND\n", hdr);
  26.  
  27. and recompile it.
  28.  
  29. t.
  30.