Mailing List Archive

Support open source code!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: tlug: Re: file counting



On Tue, 13 Oct 1998, Jim Schweizer wrote:

> Hi all,
> 
> On 12-Oct-98 Hernando TANAKA wrote:
> > No, if you're using bash, you may not use argument substitution.
> > The reason why the "psg" sample;
> > 
> >> schweiz:~$ alias psg
> >> alias psg='ps -aux | grep  $1'
> >> schweiz:~$ psg schweiz
> >> schweiz    831  0.0  3.5   94  388 pp0 S    21:48   0:00 -bash
> > 
> > is working is because the $1 is the last argument,
> > which is usually unset in the interactive shell,
> > so it's neglected by bash.  I.e.,
> 
> I see. Thanks for the info. I guess I'll just stay with the shell script. (I
> learn something new every day on this list :)

me too :) .. nothing wrong with a good shell script in this case, however.
It would be even better if you could have find count the hits for you
without using a pipe..

--------------------------------------------------
Scott M. Stone <sstone@example.com, sstone@example.com>
               <sstone@example.com>
Head of TurboLinux Development/Systems Administrator
Pacific HiTech, Inc (USA) / Pacific HiTech, KK (Japan)
http://www.pht.com		http://armadillo.pht.co.jp
http://www.pht.co.jp	        http://www.turbolinux.com


---------------------------------------------------------------
Next Nomikai: 20 November, 19:30 Tengu TokyoEkiMae 03-3275-3691
Next Meeting: 12 December, 12:30 Tokyo Station Yaesu central gate
---------------------------------------------------------------
Sponsor: PHT, makers of TurboLinux http://www.pht.co.jp


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links