Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.os.linux.misc    |    Linux-specific topics not covered by oth    |    135,536 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 134,628 of 135,536    |
|    rbowman to All    |
|    Re: Ridiculous Online Programming "Advic    |
|    11 Jan 26 07:31:34    |
   
   From: bowman@montana.com   
      
   On Sat, 10 Jan 2026 20:14:49 -0500, c186282 wrote:   
      
   > def AmRunning(ss) :   
   > return os.popen("ps ax").read().count(ss) # get, unwrap, count   
      
   .bashrc   
   AmRunning() {   
    ps aux | grep $1 | wc -l   
   }   
      
   $ AmRunning brave   
   32   
      
      
   Before Linux distros mostly switched to bash I used tcsh. You could do a   
   lot more with alias without having to write a function.   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   
|
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca