🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.bash.bug
Article #952

Problems with "*" in bash

#952
From: Robert Fellenz
Date: Wed, 18 Nov 1992 07:38
85 lines
2458 bytes
---------------------------
BASH_VERSION:   1.12.2      
hardware:	HP9000s300
compiler:	cc
---------------------------

I am currently having difficulty with the "*" in writing aliases and functions.  If the "*" is being used in a command line (ie. "ls *" ) the wild card will only match some --not all-- of the files it comes across.  The following are examples which demonstrate the problems I am having with bash.

_________________________________________________________________
example 1:

  I'm in directory "test" with the files "a", "b", "c", "d"

  bash$ ls
  a	b	c	d

  bash$ ls *
  a
  
  bash$ touch dd ddd

  bash$ ls [d]*
  d     dd    ddd

  bash$ ls *
  dd
_________________________________________________________________
example 2: Still in the same directory as in example 1.


  bash$ foo()
  >{ echo $* }

  bash$ foo *
  a

  bash$ foo x y z
  x y z

_________________________________________________________________
example 3: Same directory again


  bash$ rm -i *
  a: ? (y/n) y   <--skips b c d ...
  
  bash$ rm -i b c d
  b: ? (y/n) y
  c: ? (y/n) y
  d: ? (y/n) y

_________________________________________________________________
example 4: The following is not related to the above examples but it produces a core dump that can be very large --this might be the result of "cd" being a built in function.

  bash$ cd()
  > { cd *$ }
 
  bash$ cd

the following is the result of the function
 
  Tell root@sioux to fix this someday.
  Stopping myself...free: Called with bad argument

  Tell root@sioux to fix this someday.
  Stopping myself...
___________________________________________________________________
 
Also, my compiled version of bash is 971908 bytes, is it suppose to be that large?

I would appreciate any help you could give me.

Please email me at rcf@sioux.eel.ufl.edu.

Thanks in advance,

-bob							

Robert Fellenz					University of Florida
rcf@sioux.eel.ufl.edu				(904)372-9951



  
  
Technical Details
Message-ID: <1992Nov18.073859.24628@eng.ufl.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!chinook.eel.ufl.edu!rcf

Show Full Headers
Complete Article Headers
Newsgroups: gnu.bash.bug
Path: arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!chinook.eel.ufl.edu!rcf
From: rcf@chinook.eel.ufl.edu (Robert Fellenz)
Subject: Problems with "*" in bash
Message-ID: <1992Nov18.073859.24628@eng.ufl.edu>
Keywords: bash
Sender: gnulists@ai.mit.edu
Organization: UF EE Department
Distribution: gnu
Date: Wed, 18 Nov 1992 07:38:59 GMT
Approved: bug-bash@prep.ai.mit.edu
Lines: 87