nxsh - Simple shell containing NSF/NX interpreter
nxsh ?-c ?arg1?? ?arg2 ...?
- nxsh ?-c ?arg1?? ?arg2 ...?
- nxsh is a shell-like application that reads NX and Tcl commands
from different sources and evaluates them.
If invoked without any arguments, nxsh runs in
read-eval-print mode (REPL, interactive) similar to tclsh. In
this mode, it reads commands from standard input interactively and
prints command results as well as error messages to standard output. It
remains active until the exit command is invoked or until it reaches
end-of-file on its standard input.
If invoked with at least one positional argument arg1,
nxsh runs a NX/Tcl script sourced from a file identified by
arg1 using source.
Passing the -c flag makes nxsh accept commands
from the command line provided by arg1. If arg1 is
omitted, nxsh takes commands from standard input (e.g., in a
pipe).
nxsh can be used like tclsh to make NX scripts
directly invokable from the shell, by providing the following first line
("shebang") in the respective script:
- A (more portable) alternative is:
#! /bin/sh
# the next line restarts using nxsh \
exec nxsh "$0" "$@"
Copyright (c) 2014-16 Stefan Sobernig <stefan.sobernig@wu.ac.at>, Gustaf Neumann <gustaf.neumann@wu.ac.at>; available under the Creative Commons Attribution 3.0 Austria license (CC BY 3.0 AT).