If the pathname supplied as the parameter for the -f option is a hyphen (-), then BRU uses the standard input (stdin) for archive reading or standard output (stdout) for archive writing, as appropriate. When extracting files from an archive, (-x option), the “-f -” causes the input archive to be read from stdin. The filenames to be extracted must be in the same order as they appear in the archive (or files will be skipped). If the filenames are not in the same order, you must use the -Pf option. This will cause BRU to sort the names (by building an internal filename table) before it does the extraction.
An example would be extracting a gzip’d BRU file in a single command line:
gunzip -c gzipfile.bru.gz | bru -xvf -
This allows gunzip to expand the compressed file and pass the results via stdout/stdin through to BRU for extraction.
To perform the reverse operation, you can instruct BRU to send its output to gzip for compression as follows:
bru -cvf - /files | gzip > brufile.bru.gz
The resulting file will be a BRU archive that has been compressed with gzip. This can also be accomplished using BRU’s external compressor option, described later in this chapter.