The output of the entire group can be passed together into a single pipeline.
(cat file1; echo .bp; cat file2) | nroff
This will interpose the
request between two files to be formatted.
Parentheses are also very useful in the Bourne
shell if you want to put an entire sequence of commands separated by
semicolons into the background.
In the C shell, the command line below will
go immediately into the background.
nroff -ms file1; nroff -ms file2 &
But in the Bourne shell, the background request (
will only apply to the second command, forcing you
to wait for completion of the first job before you
get back the system prompt.
To get right back to
work, you can type:
(nroff -ms file1; nroff -ms file2) &
The parentheses start a
Commands that run between the parentheses won't affect the parent shell's
to run a command in another directory
without changingyour active shell's current directory : (38.3
; nroff -ms file1 > file.out) &
The file file.out
will be created
in the somewhere-else
shows another method for the Bourne shell.
It's more limited but can also be more efficient.