Re: $(grep anycommand anyfile) fail

2008-12-24 Thread Dave B
BlackEnvil wrote: > 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: > > [blacken...@space_s

Re: $(grep anycommand anyfile) fail

2008-12-24 Thread Paul Jarc
BlackEnvil wrote: > [blacken...@space_star ~]$ cd $HOME; mkdir hello\ -world/; touch test; echo > "ls hello\ -world/" > test; $(grep ls test); > ls: invalid line width: orld/ Since $() is unquoted, it's simply split according to $IFS (at whitespace). If you want full shell-language parsing instea

$(grep anycommand anyfile) fail

2008-12-24 Thread BlackEnvil
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'