The JavaScript Unix Shell (JSUS) presents a simplified Unix-like environment to JavaScript programs. It is designed to execute JavaScript source code files as normal Unix programs (currently only on Linux). Using the V8 JavaScript engine, the source code is dynamically compiled into the local system "machine code" and, hence, executes much faster than the interpreted code of other scripting languages. In practice, JSUS programs are almost as fast and much easier and less time consuming to develop than programs written in traditional compiled languages (such as C/C++).
JSUS exposes most of the standard Unix run-time through global JavaScript functions, indexed below. Many of these functions correspond to standard C library calls while others implement unique JSUS functionality. Click on any index topic to obtain the related documentation for all related functions. Following the index is a list of more general topics, such as how to write JSUS programs. Then, from any page in this on-line manual, you can return directly to this index by clicking on the heading at the top of each page.
JSUS and the V8 engine are both released under a BSD style, open-source license.
Error handling in JSUS: aa(), errno(), strerror() and the -a option.
Program execution environment: arg(), env(), run(), jump(), exit() abort().
The ETC configuration database: etc(), gulp().
The text translation database: getText(), _().
Process (task) management: fork(), getpid(), getppid(), kill(), wait(), daemon(), nice().
User and group information: getuid(), getgid(), geteuid(), getegid(), getuser(), getgroup(), setuid().
Random number generation: urandom(), rand(), srand().
Passwords, Encoding and Encryption: crypt(), pass(), btoa(), atob(), hash(), aes().
System log facilities: slog().
I/O with regular files: get(), put(), pos(), add(), ask(), say(), print(), cry(), grab(), plop(), flush(), sync(), close().
Inter-process File locking: lock(), free();
File permissions mask: umask().
File status information: fish(), stat(), fd(), fmajor(), fminor(), frmajor(), frminor(), fnode(), fhard(), fuid(), fgid(), fsize(), fbest(), fblocks(), fatime(), fmtime(), fctime(), ftype(), fmode().
File/directory manipulation: copy(), move(), remove(), chown(), chmod(), utime().
Hard and symbolic links: link(), symlink(), readlink().
File system directory management: cwd(), jxd(), cd(), mkdir(), remove(), glob().
Memory mapped file I/O: mm(), mind(), fold(), bigi().
Pipes, named and anonymous: mkfifo(), mkpipe(), get(), put(), ask(), say(), cry(), close().
Sockets, Internet and UNIX domains: listen(), get(), put(), close(), peeruid(), peergid(), peerpid(), peerip(), peerpt().
Domain Information Groper: dig()
Setting countdown timers: time().
Executing JavaScript libraries: load().
Calling C language libraries: c().
Version and endianness information: version().
Why JavaScript is the only practical "universal" language.
Creating and running JSUS JavaScript programs.
Managing multiple web sites, with CGI and web sockets.
Writing server-side web application programs (CGI).
Writing client/server WebSocket (WSX) Applications.
Indexed-sequential key+data collection objects.
The Scroll library — a Network Database manager.
Installing the JavaScript Unix Shell (JSUS).
JavaScript Language Reference (from Mozilla).