Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm a sucker for javascript, and i'm increasingly drawn towards writing script utilities for my everyday needs.

Currently I writing these utilities in bash scripts, but i'm not so proficient with shell scripting. I'm wondering if

  • any of you have ever come across an interpreter for javascript
  • any other convenient language that you use to write script utlitities in (like csh/perl)

[migrated from]

I got one answer on about Rhino. Is there anyway to run spidermonkey as a js interpreter on linux (and optionally windows)?

share|improve this question
I know that V8 has been used to create server-run instances of javascript apps, an example being Node.js. Maybe see how Node.js is invoked...? – Jonathan Oct 13 '10 at 9:39

It is definitely possible to run SpiderMonkey at the command line. Fedora for one includes it in the js package, and there is documentation that shows how to build it.

Do note that XML and DOM handling is actually provided by the browser, and you'll need something like XML for <SCRIPT> if you want to use them at the command line.

I still prefer Python or Bash scripts whenever appropriate though.

share|improve this answer

You may look at javascript-interpreter-to-replace-python question from stackoverflow. Personally I would rather use Python/Ruby for system scripting.

share|improve this answer

try NodeJs

It has loads or modules to help writing scripts to run on command line. Here is one of the library that can be used to write task based command line tools.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .