[plug] [PLUG] sed will not

Matt Kemner zombie at networx.net.au
Fri Oct 30 07:58:02 WST 1998

On Thu, 29 Oct 1998, John Summerfield wrote:

> the command "man gawk" gives text w/o tabs. See here:
> [summer at possum summer]$ man gawk | sed -e "s/^GAWK(1)\011/=/" | head
> GAWK(1)                  Utility Commands                 GAWK(1)
> and here
> [summer at possum summer]$ man gawk | sed -e "s/^GAWK(1)/=/" | head
> =                  Utility Commands                 GAWK(1)

This fails for the same reason the original command did - the pattern
/^GAWK(1)\011/ represents /^GAWK(1)011/

eg: (embedded tab on first command line, replaced with 011 on second line)

zombie at live:~$ echo 'GAWK(1)    '|sed -e "s/^GAWK(1)\011/=/"
zombie at live:~$ echo 'GAWK(1)011'|sed -e "s/^GAWK(1)\011/=/"

Unfortunately the gnu sed does not allow you to pass characters as their
octal equivalents.

 - Matt

More information about the plug mailing list