up vote 0 down vote favorite
Share on Facebook

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)
link|flag
2  
You should ask this on SuperUser.com instead. – Jonas Oct 13 at 6:44
You should consider node.js if you are considering using JavaScript for scripting. – Josh K Oct 13 at 9:59
i tought node.js was for writing network nodes... like clients and servers on a network.. – Here Be Wolves Oct 13 at 13:47
"If you only have a hammer, you tend to see every problem as a nail." – Lie Ryan Oct 13 at 15:05

closed as off topic by Jonas, Mark Trapp, George Marian, Josh K, bigown Oct 13 at 12:36

Questions on Programmers are expected to be about subjective issues in software development, within the scope defined in the faq.

2 Answers

up vote 0 down vote

Yes, Rhino is one of the better-known standalone JS interpreters. However, being that it's a JVM-based interpreter, it has a fairly long warmup time for the first run.

In my experience, Perl is good for scripting, as is Ruby and Python. Heck, you can even write scripts in Scheme, using scsh or Guile. ;-)

link|flag
up vote 0 down vote

This rather depends on the OS you are using.

For Windows:

  • You can run JavaScript from the command line or Windowed via cscript.exe (command line options determine which, and you can set the default). This is an entry point to Windows Scripting Host which has an API allowing file manipulation and some other things which are out of reach of JavaScript in a browser.

  • Better for management is PowerShell which provides a new administration command line and script language built on .NET with easy access to WMI, COM, remoting and other administration features. It is based on *nix shells, DCL and other sources. Uniquely (as far as I am aware) its command pipeline is based on objects (not just text) so things retain their type as processed. The SDK allows it to be extended in various ways.

link|flag

Not the answer you're looking for? Browse other questions tagged or ask your own question.