Skip to content

Spawning sub-shells

Creating sub-shells in bash is simple: just put the commands to be run in the sub-shell inside parentheses. This causes bash to start the commands as a separate process. This group of commands essentially acts like a separate script file, their input/output can be collectively redirected and/or they can be executed in the background by following the closing parenthesis with an ampersand.

via: LJ

Related posts:

  1. Remembering the shells special variables… I can never seem to remember what all of these...

Post a Comment

Your email is never published nor shared.

Contact Us SEO Powered by Platinum SEO from Techblissonline