Ksh regression on function return
Issue
- There is a regression with the following Korn Shell code:
#!/bin/ksh
g(){
cat << EOF
$(ls /etc |xargs -i echo " {}")
EOF
}
for file in $(g)
do
echo $file
done
- The above should return the list of files under
/etc. This used to work on RHEL 5.6 but does not work on RHEL 5.9. Also RHEL 6.3and 6.4 seem to be affected.
Environment
- Red Hat Enterprise Linux 5
- Red Hat Enterprise Linux 6
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
