Correct, my idea was to redirect the output of the whole script. The
example used a sample 'echo' but it could instead produce dynamically
some ISO-8859 encoded strings, due to some external constraints (ie.
database). I thought it could be an easy way to do that in a single
script. And your last comment makes it well. Thanks.
Regards,
- fpo
Le 14/05/2010 21:31, Andreas Schwab a écrit :
Bob Proulx<b...@proulx.com> 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 whole script in { ... } and add the pipe
after that.
Andreas.