It is currently Tue, 07 Dec 2021 02:29:02 GMT

Author Message
 Javascript on Unix Shell

I would like to know if Javascript can be run on Unix from a Unix shell and
not from a web server. It should be something similar to script or wscript
from Dos i.e. in a Unix command shell. Thanks in advance.


 Mon, 21 Jul 2003 10:42:16 GMT   
 Javascript on Unix Shell


You need to understand that Javascript runs on the client, ie: browser.
Netscape web servers support Javascript Server Scripts, but that's probably
not what you want.

 Mon, 21 Jul 2003 11:11:37 GMT   
 Javascript on Unix Shell
Hi Peter!

Thanks for the advice. Sorry about the multiple posting. I'm not very
familar with newsgroup postings. Btw, how do I cross post?

My problem here is that I would like to write a set of scripts that will
work on both NT and UNIX without having separate ones for NT and UNIX. Is it
possible? If yes, which language and how should I go about doing it? Thanks
for your help. (^-^)



 Mon, 21 Jul 2003 13:54:25 GMT   
 Javascript on Unix Shell

sounds like a job for perl.


Home   : | Es kann mich niemand daran hindern
Projekt:    | ber  Nacht  klger   zu   werden.
Projekt:  |                        K. Adenauer
Mailingliste, Forum, Newsserver, Anleitungen, Antworten -? Newbie-Net :o)

 Mon, 21 Jul 2003 15:13:46 GMT   
 Javascript on Unix Shell

A couple of suggestions:

* Write PERL scripts; these are probably *the* most portable
   of all scripting languages. They are very well supported in
   both the UNIX and Win32 world

* You could obtain a UNIX-like command-interpreter for Win32
   thus you would be able to create Bourne shell, or similar
   scripts executable in both environments

You will find, however, that most scripts will make use of utilities
specific to an environment, so very few scripts will be totally portable.
For example, UNIX has the 'ps' command to report on process status, while
Win NT 4.0 uses the 'tlist.exe' utility to do this, and each utility, also,
will have different options and use different conventions.

Still, using one of the above approaches has the advantage that only one
major tool be learned rather than having to master the complexities of
*both* a UNIX shell language and the Win NT Extended Batch Language.

I hope this helps.

 Mon, 21 Jul 2003 16:11:18 GMT   
 Javascript on Unix Shell
In article <95ak5b$>,

Mozilla is working on javascript that can be run as a shell:

You need a java VM to invoke the shell.  NRFPT.

If you want shell portability,  get Cygwin or UWIN or learn
Perl.  It's unlikely Javascript would be portable since the underlying
Object Models would differ so much.

Dan Mercer

Opinions expressed herein are my own and may not represent those of my employer.

 Tue, 22 Jul 2003 01:03:09 GMT   
 Javascript on Unix Shell


Your headers say you are using Outlook Express, so all you need to do is
click on the Newsgroup icon when you compose a message and add as many
newsgroups that you feel is appropriate.

Other people have suggested Perl, and I'm going to do the same.  Obviously
there are some minor differences between Perl on Unix and NT, but for most
scripts it is very trivial to make them portable.

 Tue, 22 Jul 2003 05:19:57 GMT   
 Javascript on Unix Shell
Thanks everyone. Will give it a try. (^-^)



 Tue, 22 Jul 2003 10:41:15 GMT   
 Javascript on Unix Shell

I had to deal with Perl that someone else had written on NT once and then had to
migrate it to Unix.

I couldn't get the migrated script to work on Solaris.

Therfore, I decided to just write it in Java.  Java is your best bet.

 Mon, 18 Aug 2003 06:18:47 GMT   
 Javascript on Unix Shell
Bare in mind here that 'Java' and 'Javascript' are two completely different

1.    Java programs have to be compiled into byte-code format and then run
from in a Java Virtual machine:
       code) -> javac (java compiler) ->
test.class (compiled)
    to run:
                java test

2.    Javascript is interpreted and is generally run by the Web-Client not
the server (although it can be)
        I've never come across anything that can run JavaScript as a
standalone program though - if anyone knows about
        such an interpreter - this would potentially be a useful thing-
please post here if you know !!

I would have thought that PERL should be fairly transportable - but I have
not done much PERL programming - especially not on multiple platforms - I'm
sure it's designed to portable - as long the PERL.EXE or perl interpreters
are at the same version.


 Mon, 18 Aug 2003 20:44:07 GMT   
 Javascript on Unix Shell

 Sun, 24 Aug 2003 11:32:33 GMT   
   [ 11 post ] 

Similar Threads

1. Javascript on Unix Shell

2. Javascript on Unix Shell

3. shell script to automate javascript interaction?

4. UNIX Free shell accounts Bots allowed Cuentas shell bajo unix gratis permiten bots

5. AD: Trainingetc Public Schedule - Unix, Java, Javascript Courses FYI

6. JavaScript engine for UNIX and LINUX

7. JavaScript engine for UNIX and LINUX

8. Unix and Javascript htaccess

9. Free JavaScript for unix?

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software