tldr/pages/common/sh.md

22 lines
360 B
Markdown
Raw Permalink Normal View History

2016-02-23 01:11:29 +00:00
# sh
> Bourne shell, the standard command language interpreter.
> See also `histexpand` for history expansion.
> More information: <https://manned.org/sh>.
2016-02-23 01:11:29 +00:00
- Start an interactive shell session:
2016-02-23 01:11:29 +00:00
`sh`
- Execute a command and then exit:
2016-02-23 01:11:29 +00:00
`sh -c "{{command}}"`
2016-02-23 01:11:29 +00:00
- Execute a script:
2016-02-23 01:11:29 +00:00
`sh {{path/to/script.sh}}`
2016-02-23 01:11:29 +00:00
- Read and execute commands from stdin:
2016-02-23 01:11:29 +00:00
`sh -s`