From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [204.233.198.50] (helo=linserver.complex) by speech.braille.uwo.ca with esmtp (Exim 3.32 #1 (Debian)) id 16HpqG-0005cU-00 for ; Sat, 22 Dec 2001 12:21:48 -0500 Received: (from gnowak1@localhost) by linserver.complex (8.11.4/8.10.2) id fBMHLJ400317 for speakup@braille.uwo.ca; Sat, 22 Dec 2001 11:21:19 -0600 Date: Sat, 22 Dec 2001 11:21:19 -0600 From: Gregory Nowak To: speakup@braille.uwo.ca Subject: Re: ot, a programming question Message-ID: <20011222112119.A313@uic.edu> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from chuckh@mhonline.net on Sat, Dec 22, 2001 at 06:42:39AM -0500 Sender: speakup-admin@braille.uwo.ca Errors-To: speakup-admin@braille.uwo.ca X-BeenThere: speakup@braille.uwo.ca X-Mailman-Version: 2.0.7 Precedence: bulk Reply-To: speakup@braille.uwo.ca List-Help: List-Post: List-Subscribe: , List-Id: Speakup is a screen review system for Linux. List-Unsubscribe: , List-Archive: Thanks, even though I haven't responded, I'm still following this thread. Very interesting. I have wondered too, why I saw this feature in Linux software, but not in DOS software. Now I guess I know why (grin). Greg On Sat, Dec 22, 2001 at 06:42:39AM -0500, Charles Hallenbeck wrote: > Another way to illustrate that it is the shell that expands the > wildcards is to use single quotes to prevent it from happening, > so that a wildcard is passed to the application instead of being > seen by the shell. Try this for instance: > > mpg123 '*.mp3' > > and the application will not be able to find the file whose name > contains the star! > > In the bad old days (under DOS) the Borland C++ libraries had a > linkable module called "wildargs.obj" and if your program linked > with that module it would behave just like a Linux application > does with the shell expansion. Later versions of Borland > compilers abandoned this module and expected programmers to use > calls to "findfirst" and "findnext" to yield the names that > matched the wildcards. In Linux the expansion of wildcards is > _USUALLY the job of the shell. > > HTH - Chuck > > > On Sat, 22 Dec 2001, Geoff Shang wrote: > > > Hi: > > > > The shell expands the wildcard, the wildcard itself never gets passed to > > the application. This can be demonstrated by the following script: > > > > #!/bin/sh > > echo $1 $2 $3 $4 $5 > > > > Now, you can see here that it's important to read the correct number of > > parameters. Running this script will only output the first 5 matching > > files, so you need to be able to read in all the names. I don't know how > > you'd do this in a shell script, but it'd be easy in say C. > > > > Geoff. > > > > > > > > _______________________________________________ > > Speakup mailing list > > Speakup@braille.uwo.ca > > http://speech.braille.uwo.ca/mailman/listinfo/speakup > > > > Visit me at http://www.mhonline.net/~chuckh > The Moon is Waxing Crescent (46% of Full) > > > _______________________________________________ > Speakup mailing list > Speakup@braille.uwo.ca > http://speech.braille.uwo.ca/mailman/listinfo/speakup