3 ms·
Add in dollar signs before the variables and you very nearly have valid Powershell as well. >It's all there: the "in" operator, no need for semicolon as statem
by stephengillie 9y ago
Add in dollar signs before the variables and you very nearly have valid Powershell as well.
>It's all there: the "in" operator, no need for semicolon as statement terminator, the "function" keyword, untypedness, regular expression constants, C-like curly braces, etc
At some point, these polyglots must merge. It makes no sense to have arbitrary particles be the only distinction between languages.
- krick 9y agoIs there any downside to using JS instead of Awk for one-line shell scripting? Maybe it's time to retire Awk, and use js/Perl/whatever instead for that purpose?
- shakna 9y agoAwk is much faster, and much more consistent in its memory management, and doesn't have some of the things that trip people up in JS (== vs ===, order of operations). Plus, awk is probably in any *nix system, and probably doesn't need any updates to behave as expected. (And my favourite little thing: awk's executable is tiny.)