Thread View: gnu.bash.bug
1 messages
1 total messages
Started by Robert Fellenz
Wed, 18 Nov 1992 07:38
Problems with "*" in bash
Author: Robert Fellenz
Date: Wed, 18 Nov 1992 07:38
Date: Wed, 18 Nov 1992 07:38
85 lines
2458 bytes
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
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads