delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/05/20/23:26:54

To: djgpp AT delorie DOT com
Subject: Re: Possible bash bug in "for x in $path/*x*"
References: <35637b2a DOT 6087655 AT enews DOT newsguy DOT com>
From: M DOT A DOT Bukin AT inp DOT nsk DOT su
Date: 21 May 1998 10:15:14 +0700
In-Reply-To: pjfarley@dorsai.org's message of "Thu, 21 May 1998 01:55:24 GMT"
Message-ID: <201zto2u2l.fsf@Sky.inp.nsk.su>
Lines: 17

pjfarley AT dorsai DOT org (Peter J. Farley III) writes:

> under bash version "GNU bash, version 1.14.7(2) r3.1 w/multibyte
> extension", when there is NOT any file in a directory in the $PATH
> which matches *awk*, the syntax "for awk in $path/*awk*" sets the
> variable $awk to the value of the path element plus "/*awk*".  For
> example, if "//C/WINDOWS" is in the $PATH variable, and there are NOT
> any files in that directory matching *awk*, then the $awk variable
> will be set to a value of "//C/WINDOWS/*awk*".

  I don't know if this is the cause of your problem, but read
about `allow_null_glob_expansion' in man page of bash (or maybe in info).
Also, there is a section called `Pathname Expansion' which may give
you more accurate information.

>     for awk in $path/*awk*
>     do

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019