home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / gnu / bash / bug / 656 < prev    next >
Encoding:
Text File  |  1992-11-19  |  2.3 KB  |  101 lines

  1. Newsgroups: gnu.bash.bug
  2. Path: sparky!uunet!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!chinook.eel.ufl.edu!rcf
  3. From: rcf@chinook.eel.ufl.edu (Robert Fellenz)
  4. Subject: Problems with "*" in bash
  5. Message-ID: <1992Nov18.073859.24628@eng.ufl.edu>
  6. Keywords: bash
  7. Sender: gnulists@ai.mit.edu
  8. Organization: UF EE Department
  9. Distribution: gnu
  10. Date: Wed, 18 Nov 1992 07:38:59 GMT
  11. Approved: bug-bash@prep.ai.mit.edu
  12. Lines: 87
  13.  
  14. ---------------------------
  15. BASH_VERSION:   1.12.2      
  16. hardware:    HP9000s300
  17. compiler:    cc
  18. ---------------------------
  19.  
  20. 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.
  21.  
  22. _________________________________________________________________
  23. example 1:
  24.  
  25.   I'm in directory "test" with the files "a", "b", "c", "d"
  26.  
  27.   bash$ ls
  28.   a    b    c    d
  29.  
  30.   bash$ ls *
  31.   a
  32.   
  33.   bash$ touch dd ddd
  34.  
  35.   bash$ ls [d]*
  36.   d     dd    ddd
  37.  
  38.   bash$ ls *
  39.   dd
  40. _________________________________________________________________
  41. example 2: Still in the same directory as in example 1.
  42.  
  43.  
  44.   bash$ foo()
  45.   >{ echo $* }
  46.  
  47.   bash$ foo *
  48.   a
  49.  
  50.   bash$ foo x y z
  51.   x y z
  52.  
  53. _________________________________________________________________
  54. example 3: Same directory again
  55.  
  56.  
  57.   bash$ rm -i *
  58.   a: ? (y/n) y   <--skips b c d ...
  59.   
  60.   bash$ rm -i b c d
  61.   b: ? (y/n) y
  62.   c: ? (y/n) y
  63.   d: ? (y/n) y
  64.  
  65. _________________________________________________________________
  66. 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.
  67.  
  68.   bash$ cd()
  69.   > { cd *$ }
  70.  
  71.   bash$ cd
  72.  
  73. the following is the result of the function
  74.  
  75.   Tell root@sioux to fix this someday.
  76.   Stopping myself...free: Called with bad argument
  77.  
  78.   Tell root@sioux to fix this someday.
  79.   Stopping myself...
  80. ___________________________________________________________________
  81.  
  82. Also, my compiled version of bash is 971908 bytes, is it suppose to be that large?
  83.  
  84. I would appreciate any help you could give me.
  85.  
  86. Please email me at rcf@sioux.eel.ufl.edu.
  87.  
  88. Thanks in advance,
  89.  
  90. -bob                            
  91.  
  92. Robert Fellenz                    University of Florida
  93. rcf@sioux.eel.ufl.edu                (904)372-9951
  94.  
  95.  
  96.  
  97.   
  98.   
  99.  
  100.  
  101.