APPENDIX BThe sh Utility

The description of the sh utility includes a number of features not found in some traditional shells, but it gives a good summary of basic usage. Much of this specifies interactive features (which are not universal among shells), but the basic invocation material is a handy reference.

Note All external documents referenced in this appendix are available at


sh - shell, the standard command language interpreter


sh [-abCefhimnuvx][-o option][+abCefhimnuvx][+o option]        [command_file [argument...]] sh -c[-abCefhimnuvx][-o option][+abCefhimnuvx][+o option]command_string        [command_name [argument...]] sh -s[-abCefhimnuvx][-o option][+abCefhimnuvx][+o option][argument]

Description ...

Get Beginning Portable Shell Scripting: From Novice to Professional now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.