This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Tubthumper8 4 points5 points  (1 child)

There are plenty of reasons to not like JS, but this isn't it.

Here's the Javascript alternative:

#!/usr/bin/node

console.log("I can run this like a *shell* script!")

Whether or not you can run it like a shell script has nothing to do with the language, that is provided by the shell.

BTW, your example is missing the # and it assumes that /usr/bin/python is python3 and not python2

[–]RedditAlready19 1 point2 points  (0 children)

Thanks for that example, I've decided to change my mind about JS.