nxsh(1)
π NAME π
nxsh β a simple shell that's literally carrying the whole NSF/NX interpreter inside it π«Ά
β¨ SYNOPSIS β¨
nxsh ?-c ?arg1?? ?arg2 ...?
πΈ DESCRIPTION πΈ
nxsh ?-c ?arg1?? ?arg2 ...?
okay bestie so listen β nxsh is this shell-like application that reads NX and Tcl commands from a bunch of different sources and then evaluates them. she's versatile like that π
π how she acts when you just run her
If you invoke her with no arguments at all, nxsh drops into read-eval-print mode (REPL, the interactive one) β very much the tclsh vibe. In this mode she reads commands from standard input interactively, and prints command results and error messages straight to standard output. She stays alive until you hit the exit command, or until she reaches end-of-file on her standard input. periodt β¨
π¦ how she acts when you hand her a file
If you invoke her with at least one positional argument arg1, then nxsh runs a NX/Tcl script sourced from the file that arg1 points at, using source. easy peasy π
π₯ how she acts with -c
Pass the -c flag and nxsh accepts commands from the command line, handed over via arg1. If arg1 is omitted? She takes commands from standard input instead β like when you're in a pipe. iconic.
π the shebang moment (making your scripts directly invocable)
You can use nxsh the same way you'd use tclsh to make NX scripts directly invocable from the shell β just drop this as the first line (the "shebang") of the script in question:
#! /usr/bin/env nxsh
and if you want a (more portable) alternative, use this one instead:
#! /bin/sh
# the next line restarts using nxsh \
exec nxsh "$0" "$@"
π COPYRIGHT π
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).
that's the whole thing bestie, no cap π β this was the nxsh(1) page, part of the Command-line interface manual, and it's tagging nxsh 2.4.0. go forth and source your scripts, main character π§π
π¦ where this page comes from
- alpine 3.24: nsf-doc 2.4.0-r1 Β· MIT
- debian trixie: nsf-shells 2.4.0-1 Β· MIT
- ubuntu questing: nsf-shells 2.4.0-1
- ubuntu resolute: nsf-shells 2.4.0-1build1 Β· MIT
- ubuntu stonking: nsf-shells 2.4.0-1build1 Β· MIT
- 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)\&
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms