I know in bash we can create subshells using round parenthesis ( and ). As per bash man page:
(
)
(list) list is executed in a subs
Use homebrew to install pgrep on the Mac: brew install pgrep
Check out http://mxcl.github.com/homebrew/ to install Homebrew.