[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
declare -f is incorrect
From: |
JC Cavaillé |
Subject: |
declare -f is incorrect |
Date: |
Fri, 09 Feb 2007 23:52:10 +0100 |
User-agent: |
Thunderbird 1.5.0.9 (X11/20070104) |
Configuration Information [Automatically generated, do not change]:
Machine: i486
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i486'
-DCONF_OSTYPE='linux-gnu' -DCONF_$uname output: Linux lithium 2.6.16-xen #2 SMP
Sat Sep 16 14:25:47 CEST 2006 i686 GNU/Linux
Machine Type: i486-pc-linux-gnu
Bash Version: 3.1
Patch Level: 17
Release Status: release
Description:
declare -f is incorrect with '> >(...)' or '< <(...)'
Repeat-By:
root@lithium:~# function foo
> {
> cat < <(ls)
> }
root@lithium:~# eval "$(declare -f foo)"
bash: syntax error near unexpected token `('
bash: syntax error near unexpected token `}'
root@lithium:~# declare -f foo
foo ()
{
cat <<(ls)
}
Explication: 'declare -f' generate 'cat <<(ls)', not 'cat < <(ls)'
Sorry for my expression, i'm a french computer student.
- declare -f is incorrect,
JC Cavaillé <=