Bonjour à tous,

Nous utilisons abondamment la syntaxe valide ksh suivante :
? echo titi | read a
? echo $a
titi

C'est très pratique car la variable reste connue puisque que le "read" est une commande "buildin" du ksh.

Nous sommes sur un portage de SunOS vers Linux RedHat.

Le read est annoncé officiellement en bug dans cette situation. Voir ci-dessous
Citation Envoyé par man ksh
BUGS
Any bugs in pdksh should be reported to pdksh@cs.mun.ca. Please
include the version of pdksh (echo $KSH_VERSION shows it), the machine,
operating system and compiler you are using and a description of how to
repeat the bug (a small shell script that demonstrates the bug is
best). The following, if relevant (if you are not sure, include them),
can also helpful: options you are using (both options.h options and set
-o options) and a copy of your config.h (the file generated by the con-
figure script). New versions of pdksh can be obtained from
ftp://ftp.cs.mun.ca/pub/pdksh/.
BTW, the most frequently reported bug is
echo hi | read a; echo $a # Does not print hi
I’m aware of this and there is no need to report it.
VERSION
This page documents version
@(#)PD KSH v5.2.14 99/07/13.2
of the public domain korn shell.
Connaissez-vous le problème ?
Avez-vous une solution de contournement ?

Par avance merci