Available shells

The shell that you'll likely use for scripting under Neutrino is ksh, a public-domain implementation of the Korn shell. The sh command is usually a symbolic link to ksh.

For more information about this shell, see:

  • the Using the Command Line chapter in this guide
  • the entry for ksh in the Utilities Reference
  • Rosenblatt, Bill, and Arnold Robbins. 2002. Learning the Korn Shell, 2nd Edition. Sebastopol, CA: O'Reilly & Associates. ISBN 0-596-00195-9

QNX Neutrino also supplies or uses some other scripting environments:

  • An OS buildfile has a script file section tagged by +script. The mkifs parses this script, but it's executed by procnto at boot time. It provides a very simple scripting environment, with the ability to run a series of commands, and a small amount of synchronization.
  • sed is a stream editor, which makes it most useful for performing repeated changes to a file, or set of files. It's often used for scripts, or as a utility within other scripts.
  • gawk (GNU awk) is a programming language for pattern matching and working with the contents of files. You can also use it for scripting or call it from within scripts.

In general, a shell script is most useful and powerful when working with the execution of programs or modifying files in the context of the filesystem, whereas sed, gawk, and perl are primarily for working with the contents of files. For more information, see:

  • the entries for gawk and sed in the Utilities Reference
  • Robbins, Arnold, and Dale Dougherty. 1997. sed & awk, 2nd Edition. Sebastopol, CA: O'Reilly & Associates. ISBN 1-56592-225-5
  • Schwartz, Randal L., and Tom Phoenix. 2001. Learning Perl. Sebastopol, CA: O'Reilly & Associates. ISBN 0-59600-132-0