[Top][All Lists]

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

echo foo > a b does not error

From: Petteri Räty
Subject: echo foo > a b does not error
Date: Thu, 12 May 2011 15:13:51 +0300 (EEST)

Configuration Information [Automatically generated, do not change]:
Machine: i686
OS: linux-gnu
Compiler: i686-pc-linux-gnu-gcc
Compilation CFLAGS:  -DPROGRAM='bash' -DCONF_HOSTTYPE='i686' 
-DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i686-pc-linux-gnu' 
-DCONF_VENDOR='pc' -DLOCALEDIR='/usr/share/locale' -DPACKAGE='bash' -DSHELL 
-DHAVE_CONFIG_H   -I.  -I. -I./include -I./lib  
-DSYS_BASHRC='/etc/bash/bashrc' -DSYS_BASH_LOGOUT='/etc/bash/bash_logout' 
uname output: Linux pena 2.6.38-gentoo #1 SMP Wed Mar 23 00:19:18 EET 2011 i686 
Intel(R) Core(TM) i7 CPU 920 @ 2.67GHz GenuineIntel GNU/Linux
Machine Type: i686-pc-linux-gnu

Bash Version: 4.2
Patch Level: 10
Release Status: release

        man bash says the redirection target can only be a single word but
        bash seems to silently ignore multiple words when no expansions happen

        address@hidden ~/test $ echo foo > a b
        address@hidden ~/test $ multi="a b"
        address@hidden ~/test $ echo foo > ${multi}
        bash: ${multi}: ambiguous redirect

        I think both cases should give the same error

reply via email to

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