Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!linus!philabs!cmcl2!seismo!hao!hplabs!sri-unix!rfd@ARDC.ARPA From: rfd@ARDC.ARPA Newsgroups: net.unix-wizards Subject: Re: hiding from w(1)? Message-ID: <1278@sri-arpa.UUCP> Date: Mon, 25-Jun-84 19:48:58 EDT Article-I.D.: sri-arpa.1278 Posted: Mon Jun 25 19:48:58 1984 Date-Received: Sat, 30-Jun-84 01:31:03 EDT Lines: 42 From: "Robert F. Donnelly" (MISD-WAD) The simplest way to fix w and ps from telling too much is to search the command line and stop printing after you reach the first blank. Included is the diff's from old code to new code. ... Bob First w 20a21 > #include 118c119 < char *cp; --- > char *cp, *index(); 120a122 > register char *pt_blank; 271a274,275 > if( (pt_blank = index(pr[i].w_args,' ')) != 0 ) > *pt_blank = '\0'; 318a323,324 > register char *pt_blank; > char *index(); 349a356,357 > if( (pt_blank = index(doing, ' ')) != 0 ) > *pt_blank = '\0'; and now ps 22a23 > #include 149a151 > char *pt_blank, *index(); 292c294,296 < else --- > else { > if( (pt_blank = index(sp->ap->a_cmdp,' ')) != 0) > *pt_blank = '\0'; 293a298 > }