Robert Nicholson asked,
| Era was talking about David Tamkin and how he used a "hold space?"
|
| Is this a procmail term or David's own invention?
Neither: it's a sed term. The recipe with a sed filter for duplicating the
entire head at the top of the body (assumes that the head will fit inside
sed's hold space limit) to which Era referred was this:
:0fh
| sed -e H -e '$ G'
# or sed 'H;$ G' if your sed groks semicolons
A sed script to print the entire input twice can be written without using the
hold space (some people don't like to), but it's ugly, and everything still
has to fit in the pattern space:
| sed -e :a -e '$ bb' -e N -e ba -e :b -e p
However, we can assume that the head will have at least two lines (From_ and
the blank terminator, if nothing else) and simplify it to this:
| sed -e :a -e N -e '$ !ba' -e p