bug-bash
[Top][All Lists]
Advanced

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

$(grep anycommand anyfile) fail


From: BlackEnvil
Subject: $(grep anycommand anyfile) fail
Date: Tue, 23 Dec 2008 18:26:17 +0100

Configuration Information [Automatically generated, do not change]:
Machine: x86_64
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS:  -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64'
-DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='x86_64-unknown-linux-gnu'
-DCONF_VENDOR='unknown' -DLOCALEDIR='/usr/share/locale' -DPACKAGE='bash'
-DSHELL -DHAVE_CONFIG_H   -I.  -I. -I./include -I./lib   -march=native -O2
-pipe -mtune=generic -O2 -pipe
uname output: Linux space_star 2.6.27-ARCH #1 SMP PREEMPT Wed Dec 10
13:09:04 CET 2008 x86_64 Intel(R) Core(TM)2 CPU T7200 @ 2.00GHz GenuineIntel
GNU/Linux
Machine Type: x86_64-unknown-linux-gnu

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

Description: using ` ` or $() with command that use dirnames with spaces
fail.

there are diferent dirnames with this problem, and different situations that
cause these errors, not only with ls and not only with grep.

bye


Repeat-By:

[blackenvil@space_star ~]$ cd $HOME; mkdir hello\ -world/; touch test; echo
"ls hello\ -world/" > test; $(grep ls test);
ls: invalid line width: orld/
[blackenvil@space_star ~]$


[blackenvil@space_star ~]$ cd $HOME; mkdir hello-\ world/; touch test; echo
"ls hello-\ world/" > test; $(grep ls test);
ls: cannot access hello-\: No such file or directory
world/:
[blackenvil@space_star ~]$



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]