[H-GEN] Mail program
Anthony Towns
aj at azure.humbug.org.au
Tue Jun 29 13:25:11 EDT 2004
On Sun, Jun 27, 2004 at 05:53:29PM +1000, Greg Black wrote:
> On 2004-06-27, Anthony Towns wrote:
> > Pfft, amateurs.
> >
> > sed -e ':x;s/^\( *>>*\)\( *>\)/\1>/;tx;s/^\( *>>*\) */\1 /'
> $ cat bar | sed -e ':x;s/^\( *>>*\)\( *>\)/\1>/;tx;s/^\( *>>*\) */\1 /' > barbar
> sed: 2: ":x;s/^\( *>>*\)\( *>\) ...": unused label 'x;s/^\( *>>*\)\( *>\)/\1>/;tx;s/^\( *>>*\) */\1 /'
> You must be using some funny version of sed ...
*shrug* It's GNU sed 4.0.7. POSIX seems to require labels, and the s/// and t
commands, so the only other problem you could maybe be having seems to be
with the ; separator, which means you might have to do:
$ sed -e ':x
s/^\( *>>*\)\( *>\)/\1>/
tx
s/^\( *>>*\) */\1 /'
or
sed -e ':x' -e 's/^\( *>>*\)\( *>\)/\1>/' -e 'tx' -e 's/^\( *>>*\) */\1 /'
Though why you'd want tools that force you through those sort of
syntactic contortions when they're tools that just let you use the good
ol' semi-colon is beyond me...
Cheers,
aj
--
Anthony Towns <aj at humbug.org.au> <http://azure.humbug.org.au/~aj/>
Don't assume I speak for anyone but myself. GPG signed mail preferred.
``Like the ski resort of girls looking for husbands and husbands looking
for girls, the situation is not as symmetrical as it might seem.''
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
URL: <http://lists.humbug.org.au/pipermail/general/attachments/20040630/a8372d90/attachment.sig>
More information about the General
mailing list