Hello, ksh doesn't parse the "$(<file)" construct in a herestring as expected.
Hitting enter interactively at the end of the line shows the PS2 string rather
than executing the command. It does work as expected in a heredoc. Tested
on the current stable and beta versions.

 $ for sh in {{,m}k,ba,z}sh; do "$sh" -c 'read -r x y <<<"$(</proc/self/stat)"; 
printf "%s: %s, %s\n" "$1" $$ $x' -- "$sh"; done
ksh: 23144, 
mksh: 23145, 23145
bash: 23147, 23148
zsh: 23149, 23149

 $ print "${.sh.version}"
Version JM 93u+ 2012-05-04
 $ uname -a
Linux ormaajbox 3.3.4-pf+ #58 SMP PREEMPT Tue May 1 22:19:42 CDT 2012 x86_64 
Intel(R) Core(TM) i7 CPU 920 @ 2.67GHz GenuineIntel GNU/Linux

Thanks
-- 
Dan Douglas

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
ast-developers mailing list
[email protected]
https://mailman.research.att.com/mailman/listinfo/ast-developers

Reply via email to