Skip to content

Latest commit

 

History

History
8 lines (7 loc) · 286 Bytes

subshells.md

File metadata and controls

8 lines (7 loc) · 286 Bytes

Subshells

In Bash scripts, subshells (written with parentheses) are convenient ways to group commands. A common example is to temporarily move to a different working directory

# do something in current dir
(cd /some/other/dir && other-command)
# continue in original dir