From: Martin Stromberg Message-Id: <200006151204.OAA20135@lws256.lu.erisoft.se> Subject: Re: "ls" bug ? To: djgpp-workers AT delorie DOT com Date: Thu, 15 Jun 2000 14:04:37 +0200 (MET DST) In-Reply-To: <200006151133.NAA01575@cerbere.u-strasbg.fr> from "Pierre Muller" at Jun 15, 2000 01:08:13 PM X-Mailer: ELM [version 2.5 PL3] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Reply-To: djgpp-workers AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp-workers AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk > > > Doing "ls *.exe " > > gives me invalid option -- . > Other extensions seem to work correctly ! > also " ls t*.exe" works correctly! > It does only so in a directory contains a > file with name -gstab.exe > (note the leading minus !) > ( minus is probably an illegal char for Dos Names but under Windows > its easy to generate such a file name !) > (the .exe has nothing special, if I create a file "-a.out" > ls *.out also gives the same message !) > > Is this a known bug or feature ? Seems to be a feature (at least common with Solaris): 911>touch -- -hmm 912>ls * ls: invalid option -- h Try `ls --help' for more information. It makes sense as the shell expands the "*" to "-hmm" (in my case) among the other files which is then passed to ls so ls sees "-hmm" as an argument. Try "ls -- *" or "ls -- *.exe" in stead: 913>ls -- * -hmm Right, MartinS