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



 
Author Message
 Javascript on Unix Shell
Hi!

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.

Regards,
Jan



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

news:95aiep$pfi$1@dahlia.singnet.com.sg...

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. (^-^)

Regards,
Jan

news:95ak5b$278$1@hermes.nz.eds.com...



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

sounds like a job for perl.

karsten

--
Home   : http://www.nethunter2000.de | Es kann mich niemand daran hindern
Projekt: http://www.newbie-net.de    | ber  Nacht  klger   zu   werden.
Projekt: http://www.newbierouter.de  |                        K. Adenauer
Mailingliste, Forum, Newsserver, Anleitungen, Antworten -? Newbie-Net :o)



 Mon, 21 Jul 2003 15:13:46 GMT   
 Javascript on Unix Shell
news:95atn1$v8k$1@dahlia.singnet.com.sg...

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$27...@hermes.nz.eds.com>,

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

   http://www.mozilla.org/rhino/shell.html

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
damer...@mmm.com

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

news:95atn1$v8k$1@dahlia.singnet.com.sg...

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. (^-^)

Jan

news:95aiep$pfi$1@dahlia.singnet.com.sg...



 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
things:

1.    Java programs have to be compiled into byte-code format and then run
from in a Java Virtual machine:
       eg)
                test.java(source 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.

John



 Mon, 18 Aug 2003 20:44:07 GMT   
 Javascript on Unix Shell
http://www.bbassett.net/njs/download.html


 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