4 ms·
but rc doesn't have built in regex and doesn't have hash tables. My guess is that bash is trying to be a full scripting language these days, sort of like perl.
by MichaelMoser123 7y ago
but rc doesn't have built in regex and doesn't have hash tables. My guess is that bash is trying to be a full scripting language these days, sort of like perl.
- MisterTea 7y agoBecause rc is a shell to run commands, hence the name rc, run command. For the tasks you mentioned you would use a program or language such as awk to handle those cases.
- dexen 7y ago>but rc doesn't have built in regex and doesn't have hash tables That's an advantage; Plan 9 provides awk for those use cases. There is a clear separation, and a simple yet powerful language for communication (pipes, file descriptors, and files). >bash is trying to be a full scripting language these days Arguably Bash over-did somewhere around the time they added support for TCP connections exec {FD}<>/dev/tcp/news.ycombinator.com/80; echo GET / >&$FD; cat <&$FD
- cat199 7y agoNot sure if arguing for plan9 simplicity by pointing out bashisms designed to emulate how one might use sockets on plan9/rc is the best strategy.
- AnIdiotOnTheNet 7y agoThe difference being that such functionality arose from the fundamentals of how plan9 worked, whereas bash hacked in a simulacrum.
- nimrody 7y agoActually, that's something that seems inspired by Plan 9 with its /net/tcp/xxx files. Bash just tries to make it cross platform so it cannot rely on the host OS like rc does.
- mprovost 7y agoThere were already netcat and similar tools that worked together with bash to provide this functionality.
- chubot 7y agoMaybe there was a clear separation 30 years ago, but there no longer is. The shortcut for the posts below is that you can write a Lisp in all of shell, awk, and make (and sed too) [1] I won't get to this in Oil (without help) but I still think it's valid. The languages have so much overlap that they should just be combined. Of course that's what Perl was (leaving out Make), but Raku and Python 3 seem to have left a hole in that design space. Shell, Awk, and Make Should Be Combined http://www.oilshell.org/blog/2016/11/13.html http://www.oilshell.org/blog/2016/11/13.html Example Code in Shell, Awk, and Make http://www.oilshell.org/blog/2016/11/14.html http://www.oilshell.org/blog/2016/11/14.html [1] https://github.com/kanaka/mal/tree/master/impls https://github.com/kanaka/mal/tree/master/impls