variable

Bash OSTYPE — operating system label

Bash initializes a label describing the operating system. The exact text is build-dependent; it does not determine every external utility option or feature. Run in a fresh private directory with HOME set to that directory and LC_ALL=C. Expected output (one item per line): OS type present.

Formal Syntax & Structure

bash syntaxbash
${OSTYPE}

Return Value

string

Current value of the variable; expansion does not independently return an exit status.

Working Example

Example Snippetbash
[[ -n $OSTYPE ]] || exit 1printf 'OS type present\n'
Bash Reference