Manual Pages for UNIX Darwin command on man jrunscript
MyWebUniversity

Manual Pages for UNIX Darwin command on man jrunscript

jrunscript(1) jrunscript(1)

NAME

jrunscript - command line script shell

SYNOPSIS

jjrruunnssccrriipptt [ options ] [ arguments... ] PPAARRAAMMEETTEERRSS options Options, if used, should follow immediately after the command name. arguments

Arguments, if used, should follow immediately after options or com-

mand name.

DESCRIPTION

jjrruunnssccrriipptt is a command line script shell. jrunscript supports both an

interactive (read-eval-print) mode and a batch (-ff option) mode of

script execution. This is a scripting language independent shell. By

default, JavaScript is the language used, but the -ll option can be used

to specify a different language. Through Java to scripting language

communication, jrunscript supports "exploratory programming" style.

NNOOTTEE:: This tool is eexxppeerriimmeennttaall and may nnoott be available in future ver-

sions of the JDK. OOPPTTIIOONNSS

-ccllaassssppaatthh path

Specify where to find the user's .class files that are accessed by the script.

-ccpp path

This is a synonym for -ccllaassssppaatthh path

-DDname==value

Set a Java system property.

-JJflag

Pass flag directly to the Java virtual machine on which jrunscript

is run.

-ll language

Use the specified scripting language. By default, JavaScript is used. Note that to use other scripting languages, you also need to

specify the corresponding script engine's jar file using -ccpp or

-ccllaassssppaatthh option.

-ee script

Evaluate the given script. This option can be used to run "one liner" scripts specified completely on the command line.

-eennccooddiinngg encoding

Specify the character encoding used while reading script files.

-ff script-file

Evaluate the given script file (batch mode).

-ff -

Read and evaluate a script from standard input (interactive mode).

-hheellpp

Output help message and exit.

-??

Output help message and exit.

-qq

List all script engines available and exit. AARRGGUUMMEENNTTSS

If [arguments...] are present and if no -ee or -ff option is used, then

the first argument is the script file and the rest of the arguments, if

any, are passed as script arguments. If [arguments..] and -ee or -ff

option are used, then all [arguments..] are passed as script arguments.

If [arguments..], -ee and -ff are missing, interactive mode is used.

Script arguments are available to a script in an engine variable named "arguments" of type String array. EEXXAAMMPPLLEESS EExxeeccuuttiinngg iinnlliinnee ssccrriippttss

jjrruunnssccrriipptt -ee ""pprriinntt((''hheelllloo wwoorrlldd''))""

jjrruunnssccrriipptt -ee ""ccaatt((''hhttttpp::////jjaavvaa..ssuunn..ccoomm''))""

UUssee ssppeecciiffiieedd llaanngguuaaggee aanndd eevvaalluuaattee ggiivveenn ssccrriipptt ffiillee

jjrruunnssccrriipptt -ll jjss -ff tteesstt..jjss

IInntteerraaccttiivvee mmooddee jjrruunnssccrriipptt jjss>>pprriinntt((''hheelllloo wwoorrlldd''));; hheelllloo wwoorrlldd jjss>>3344 ++ 5555 8899 jjss>> tthhrreeaadd((ffuunnccttiioonn(()) {{ pprriinntt((''hheelllloo wwoorrlldd''));; }} hheelllloo wwoorrlldd jjss>> RRuunn ssccrriipptt ffiillee wwiitthh ssccrriipptt aarrgguummeennttss jjrruunnssccrriipptt tteesstt..jjss aarrgg11 aarrgg22 aarrgg33 test.js is script file to execute and arg1, arg2 and arg3 are passed to script as script arguments. Script can access these using "arguments" array.

SEE ALSO

If JavaScript is used, then before evaluating any user defined script,

jrunscript initializes certain built-in functions and objects. These

JavaScript built-ins are documented in jsdocs.

06 Aug 2006 jrunscript(1)




Contact us      |      About us      |      Term of use      |       Copyright © 2000-2019 MyWebUniversity.com ™