)script and )sscript accept an input file name and an optional output file name. File names must be in quotes. A dash (-) for the input file name means "standard input", i.e. the keyboard. The input file consists of lines of APL sentences and other input lines, and is known as a "script". The output file is suitable for subsequent use as a script. System commands in scripts are ignored. )script differs from )sscript in that it outputs to the "standard output" (the screen) as well as to any output file. Examples:
)script - 'sesslog'
Input obtained from the keyboard; output
appended to file "sesslog" and to the screen.
)sscript '\jscripts\asdf'
Input from file "\jscripts\asdf"; no output.
Input reverts to the keyboard at the end of
"\jscripts\asdf".
)sscript 'disk:folder:fold1:inf' 'outf'
Input obtained from "disk:folder:fold1:inf";
output appended to "outf".
)script -
Default.
If there is a file named "profile.js" in the current directory, J will automatically execute )script 'profile.js' at the start of a session.