bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Wildcard expansion doesn't handle filenames with spaces


From: a . t . hofkamp
Subject: Wildcard expansion doesn't handle filenames with spaces
Date: Tue, 6 Feb 2001 13:28:20 +0100

Configuration Information [Automatically generated, do not change]:
Machine: i386
OS: Linux
Compiler: gcc
Compilation CFLAGS:   -DHAVE_VFPRINTF -DHAVE_UNISTD_H -DHAVE_STDLIB_H 
-DHAVE_LIMITS_H        -DHAVE_GETGROUPS -DHAVE_RESOURCE -DHAVE_SYS_PARAM 
-DVOID_SIGHANDLER -DHAVE_GETDTABLESIZE -DHAVE_BCOPY -DHAVE_GETPW_DECLS 
-DHAVE_GETHOSTNAME -DHAVE_WAIT_H         -DHAVE_DUP2 -DHAVE_STRERROR  
-DHAVE_DIRENT_H -DHAVE_STRING_H        -DHAVE_VARARGS_H -DHAVE_STRCHR  
-DHAVE_DEV_FD        -Di386 -DLinux -DSHELL -DHAVE_ALLOCA -DHAVE_ALLOCA_H       
-O2 -m486 -fno-strength-reduce
uname output: Linux se-46.wpa.wtb.tue.nl 2.2.18pre9 #1 Mon Sep 18 14:40:09 CEST 
2000 i686 unknown

Bash Version: 1.14
Patch Level: 7

Description:
        When a filename in a wildcard expansion uses spaces, it is incorrectly 
handled.

Repeat-By:
        1) argc script that prints #arguments given:
           #!/bin/bash
           echo $#

        2) Construct 2 files
           touch here\ f.file  here.file

        3) Perform wildcard expansion:
           for i in *.file
           do ./argc $i
           done

        Expected outcome: (zsh does this)
          1
          1

        Real output:
          2
          1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]