WannabeCoder WannabeCoder - 1 year ago 69
Linux Question

Is there a common name for all command shell scripts?

I frequently find myself needing to describe a simple Linux command that can be performed on all major shell interpreters (ksh, bash, sh), but I don't know how to indicate that. Some examples would be:

, or

To get specific, I want to speak without referring to any shell in particular. In a SQL context, this is simple: "SQL" refers to the shared standard between all flavors (Oracle, MSSQL, etc.). SO seems to believe the term is "shell", but even it demands you use a more specific shell tag, implying that there is no workable shared functionality.

Is there a name for all the shared syntax between Unix/Linux command shells, or does it not exist at all?

Answer Source

ls, cd, and cp are all instances of what POSIX calls utilities.

Utilities may be external (an executable file in the filesystem) or built-in (internal to the shell).

Some utilities exist both as a regular shell built-in as well as an external utility (e.g., test).
Additionally, there are special built-in utilities (e.g., .), which are internal to the shell only.

From a broader perspective, you can call them POSIX / [standard] Unix [command-line] utilities.

POSIX mandates both what utilities are part of the standard Scroll down to bullet point Utilities on the linked page. (must be present on conformation systems) as well as what specific options they must support and behaviors they must exhibit.

Actual platforms are typically a superset of that - both in terms of offering nonstandard utilities and having standard utilities support additional, nonstandard options.

To refer to the standardized shell language syntax, you can use the term [POSIX] shell command language, though the shorthands sh or /bin/sh are frequently used, based on the fact that the default shell on Unix-like systems can only be expected to implement POSIX-mandated features (and nothing more).

Note that built-in utilities are a shell-specific concept (and a POSIX-compatible shell must support the options and behaviors specified in the POSIX shell-language specification).
They cannot be called (directly) when no shell is involved, such as when using xargs, or find ... -exec.

By contrast, external utilities exist independently of the shell, even though they are typically called from the shell.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download