exec status with no command is 0 but no redirection

2010-05-14 Thread fpo
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/local/shar

Re: exec status with no command is 0 but no redirection

2010-05-14 Thread Bob Proulx
fpo wrote: > Well, I am not sure it is a bug. I just tried this after reading the > manual page and the exec built-in command. I was expecting to have the > iconv command be called on the standard output of the shell script. Thank you for the report. But this is not a bug. You are misunderst

Re: exec status with no command is 0 but no redirection

2010-05-14 Thread Andreas Schwab
Bob Proulx writes: > Beyond this I am not sure what you wanted to do with exec. You may > have wanted this: > > exec iconv -f ISO_8859-1 -t UTF-8 I think he rather wants this: exec > >(iconv -f ISO_8859-1 -t UTF-8) (See Process Substitution in the bash manual.) Alternatively, enclose the w