shell script question

Erik Price eprice at ptc.com
Mon Jan 20 09:08:33 EST 2003


Ben Boulanger wrote:
> On Mon, 2003-01-20 at 08:38, Erik Price wrote:
> 
>>[erikprice at host:/home/erikprice]$ for i in `ls`; do "`which du` -khs 
>>$i"; done
> 
> [ ... ]
> 
>>As you can see in the above, I've had to put `which du` in the "do" 
>>section (because for some reason the "du" command isn't found if I don't 
>>specify an absolute path), and the filename arguments passed to the "do" 
>>section aren't found.  If I just type "du -khs bak" then it works fine.
> 
> 
> Get rid of those double quotes!  :)

Strange -- I didn't think that the double quotes would cause problem -- 
they do allow expansion don't they?  (It's single quotes that don't?)

At any rate, thanks guys.


Erik




More information about the gnhlug-discuss mailing list