Is 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?
Awk 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.)