4 ms·
I probably should be embarrassed to admit I didn't know about much of the stuff on this page about parameter expansion: http://wiki.bash-hackers.org/syntax/pe
by leephillips 9y ago
I probably should be embarrassed to admit I didn't know about much of the stuff on this page about parameter expansion:
http://wiki.bash-hackers.org/syntax/pe http://wiki.bash-hackers.org/syntax/pe
Bash is insane.
- chubot 9y agoIt is a horrible language design, which was impressed upon me after implementing it for my shell Oil. Here are some pathological cases I pointed out: ${####}: http://www.oilshell.org/blog/2016/10/28.html http://www.oilshell.org/blog/2016/10/28.html Each # means a different thing. ${foo//z//}: http://www.oilshell.org/blog/2016/10/29.html http://www.oilshell.org/blog/2016/10/29.html There are three different meanings of / there. "${a[@]}" -- http://www.oilshell.org/blog/2016/11/06.html http://www.oilshell.org/blog/2016/11/06.html You need 8 punctuation chars in addition to the array name to correctly interpolate it. Every other way gives you word splitting issues.