The side effects apply to var=value assignments in front of eval or typeset commands as well:
home> /bin/ksh -c 'AUX=aux eval echo \$AUX; echo "AUX="$AUX' aux AUX=aux home> /bin/ksh -c 'AUX=aux typeset -p AUX ; echo "AUX="$AUX' AUX=aux AUX=aux home> /bin/bash -c 'AUX=aux eval echo \$AUX; echo "AUX="$AUX' aux AUX= home> /bin/bash -c 'AUX=aux typeset -p AUX ; echo "AUX="$AUX' declare -x AUX="aux" AUX= home> Version AJM 93u+ 2012-08-01 Mit freundlichen Gruessen / Best Regards Axel PHILIPP -----Ursprüngliche Nachricht----- Von: [email protected] [mailto:[email protected]] Im Auftrag von David Korn Gesendet: Mittwoch, 24. Juli 2013 17:44 [...] It worked in ksh93u but it was leaving side effects and this violated the standard. When I run this in bash, I get $ bash -c 'typeset -i x=1; x+=1 command eval echo \$x' 1 If I run $ ksh93u -c 'typeset -i x=1; x+=1 command eval echo \$x;echo $x' 2 2 which is not correct since regular command should not leave side effects in the current environment. I haven't yet decided how to resolved this. David Korn [email protected] _______________________________________________ ast-users mailing list [email protected] http://lists.research.att.com/mailman/listinfo/ast-users -- MTU Aero Engines AG Geschaeftsfuehrung/Board of Management: Egon W. Behle, Vorsitzender/CEO; Dr. Rainer Martens, Michael Schreyögg, Dr. Stefan Weingartner, Reiner Winkler Vorsitzender des Aufsichtsrats/Chairman of the Supervisory Board: Klaus Eberhardt Sitz der Gesellschaft/Registered Office: Muenchen Handelsregister/Commercial Register: Muenchen HRB 157206 Diese E-Mail sowie ihre Anhaenge enthalten MTU-eigene vertrauliche oder rechtlich geschuetzte Informationen. Wenn Sie nicht der beabsichtigte Empfaenger sind, informieren Sie bitte den Absender und loeschen Sie diese E-Mail sowie die Anhaenge. Das unbefugte Speichern, Kopieren oder Weiterleiten ist nicht gestattet. This e-mail and any attached documents are proprietary to MTU, confidential or protected by law. If you are not the intended recipient, please advise the sender and delete this message and its attachments. Any unauthorised storing, copying or distribution is prohibited. _______________________________________________ ast-users mailing list [email protected] http://lists.research.att.com/mailman/listinfo/ast-users
