HiveBrain v1.2.0
Get Started
← Back to all entries
snippetbashTip

sh — Bourne shell, the standard command language interpreter. See also: `!`, `^`. More information: <http

Submitted by: @import:tldr-pages··
0
Viewed 0 times
theshellcommandshclistandardbourne

Problem

How to use the sh command: Bourne shell, the standard command language interpreter. See also: !, ^. More information: <https://manned.org/sh>.

Solution

sh — Bourne shell, the standard command language interpreter. See also: !, ^. More information: <https://manned.org/sh>.

Start an interactive shell session:
sh


Execute a command and then exit:
sh -c "{{command}}"


Execute a script:
sh {{path/to/script.sh}}


Read and execute commands from stdin:
sh -s

Code Snippets

Start an interactive shell session

sh

Execute a command and then exit

sh -c "{{command}}"

Execute a script

sh {{path/to/script.sh}}

Read and execute commands from `stdin`

sh -s

Context

tldr-pages: common/sh

Revisions (0)

No revisions yet.