GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||
GeezerVison is showing reference.wolfram.com — WolframScript—Wolfram Documentation WolframScript
NAME
SYNOPSIS
DESCRIPTION
OPTIONSCode Options
Execution Options
WSTPServer Options
Utility Options
DETAILSWolfram Language ScriptsThe options specified on the All standard options can be used in With With The exit code from executing a script can be specified using Exit[code]. Without With the option With the option The Command-Line InputInput given to a script on standard input can be accessed in Wolfram Language code using $ScriptInputString. Arguments given on the command line can be accessed using $ScriptCommandLine. Output FormattingThe default setting for TotalWidth is Infinity. API ParametersIf an API supports extended parameters such as Code LocationIn WSTPServer Usage DetailsWolframScript can use DNS Service Discovery (DNS-SD) in order to find advertised WSTPServer services on the network. With the option With the option If the option WolframScript primarily uses profiles to interact with WSTPServer. Profiles are files that contain a description of a kernel managed by WSTPServer. The form this description must take is given in the section "PROFILE VARIABLES" that follows. If the option If the option If the option If the option EXAMPLESCode from Command LineEvaluate the Wolfram Language code 2+2 on a local Wolfram Engine:
Evaluate the Wolfram Language code 2+2 in the Wolfram Cloud, prompting for authentication as needed:
If a running WSTPServer is available on the network, evaluate the Wolfram Language code 2+2 in that WSTPServer:
Evaluate Wolfram Language code locally, escaping input for a Unix-style shell:
Evaluate Wolfram Language code locally, escaping input for the Windows
Evaluate code and put the results in a file:
Code from FileEvaluate Wolfram Language code from a file, returning the last result generated:
Take code from a local file, but run it in the cloud:
Script FilesA file set up to execute Wolfram Language code locally:
file.wls
A file to execute Wolfram Language code in the Wolfram Cloud in a Unix-style shell:
file.wls
A file to execute Wolfram Language code in a running WSTPServer in a Unix-style shell:
file.wls
A file that uses a command-line argument:
file.wls
A file giving a function whose arguments come from the command line in a Unix-style shell:
file.wls
Interactive OperationRun the Wolfram Language in an interactive REPL:
Run the Wolfram Language in an interactive REPL using a running WSTPServer:
APIsRun a cloud API:
Get the code for an API from the cloud, but run the API locally:
Additional ExamplesSign in to a different cloud account:
Provide credentials without using a prompt:
Disconnect from the cloud, clearing connection information:
Reverse the string on each line of an input file, writing the result to another file in a Unix-style shell:
Reverse the string on each line of an input file, writing the result to another file using
Limit an evaluation using timeout:
Use a specific character set for output in a Unix-style shell:
Use a specific character set for output using
Use the options
file.wls
Print each result generated during the execution of a script using the
file.wls
Create an API protected by a PermissionsKey, and pass the key to CloudDeploy[APIFunction[{"n" -> Integer}, #n ^ 2&], Permissions -> {PermissionsKey["thekey"] -> "Execute"}]CloudObject["https://www.wolframcloud.com/obj/83aa0bc2-8e0c-4ef6-b314-48e0bf283196"]
Check the version of
Configure to use a particular
FILESDefault configuration file:
Default authentication folder:
WOLFRAM LANGUAGE VARIABLESThe following variables are set when
ENVIRONMENT VARIABLES
WSTPSERVER PROFILE VARIABLES
If a profile variable is not provided, WolframScript will not select for a kernel managed by WSTPServer according to that profile variable. Tech NotesSee Also$ScriptCommandLine $ScriptInputString $IgnoreEOF $BatchOutput Formats: WL Programs: wolfram wstpserver WolframNB Related Guides | ||||||||||||||||||
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |