[plug] ls

James Andrewartha trs80 at ucc.gu.uwa.edu.au
Mon Feb 26 22:56:29 WST 2001


On Mon, 26 Feb 2001, Bernard Blackham wrote:

> On Mon, 26 Feb 2001, James Andrewartha wrote:
> > That's because bash globs (expands) the command line, turning *.html into
> > all the .html files in the directory, eg index.html links.html etc, and
> > then the final arugment to ls is the root directory, so it lists that as
> > well. You want ls -R "*.html" / to stop the shell expansion happening.
> 
> Bash won't expand it if it cant (and in my root directory, it cant). And
> even still ls won't recognise to expand *.html itself, rather it'll go
> search for a file *.html and not find it either. So even if it's quoted it
> won't do what Ryan said. Or am I completely missing something here?

No, you're right. zsh does try to expand *.html though, and I assumed
bash did too. However there is no excuse for not picking up that what I  
said didn't work (hmm, maybe I should try it before I send next time ...)

-- 
"There's nobody getting rich  |  TRS-80              UCC Fresher Rep
 writing software that I      |  Email:    trs80(a)ucc.gu.uwa.edu.au
 know of" - Bill Gates, 1980  |  Web:       http://trs80.ucc.asn.au/




More information about the plug mailing list