bug-bash
[Top][All Lists]
Advanced

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

bash does not handle escape sequences for inserted paramaters to for


From: jks
Subject: bash does not handle escape sequences for inserted paramaters to for
Date: Tue, 7 Aug 2007 19:17:10 -0400

Configuration Information [Automatically generated, do not change]:
Machine: i686
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS:  -DPROGRAM='bash' -DCONF_HOSTTYPE='i686' 
-DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i686-pc-linux-gnu' 
-DCONF_VENDOR='pc' -DLOCALEDIR='/usr/local/share/locale' -DPACKAGE='bash' 
-DSHELL -DHAVE_CONFIG_H   -I.  -I. -I./include -I./lib   -g -O2
uname output: Linux x2 2.6.9-42.ELsmp #1 SMP Wed Jul 12 23:27:17 EDT 2006 i686 
i686 i386 GNU/Linux
Machine Type: i686-pc-linux-gnu

Bash Version: 3.2
Patch Level: 0
Release Status: release

Description:
I need to process files with spaces in them in a for loop.
  I tried using ls --quoting-style=escape but that didn't work
because bash didn't honor the \ escaping for the spaces.

Repeat-By:
[root@x2 /local/download/src/bash-3.2]# for I in a b\ c ; do echo $I ; done
a
b c
[root@x2 /local/download/src/bash-3.2]# for I in `echo a b\\ c` ; do echo $I ; 
done
a
b
c

Fix:
        [Description of how to fix the problem.  If you don't know a
        fix for the problem, don't include this section.]




reply via email to

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