[plug] [PLUG] sed will not

John Summerfield summer at os2.ami.com.au
Sat Oct 31 00:02:22 WST 1998


On Fri, 30 Oct 1998, Matt Kemner wrote:

> 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/=/"
> GAWK(1)
> 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.


You can't say that from this example. There is no tab to be found. See
this:
[summer at possum summer]$ man gawk | head -4 | hexdump
0000000 0a0a 470a 5741 284b 2931 2020 2020 2020
0000010 2020 2020 2020 2020 2020 2020 7455 6c69
0000020 7469 2079 6f43 6d6d 6e61 7364 2020 2020
0000030 2020 2020 2020 2020 2020 2020 4720 5741
0000040 284b 2931 000a                         
0000045

Not a tab in sight. Lots of spaces and newlines. No tabs.

Just as I said before.


Oh, and I don't regard is as a favour to mail me in duplicate. One to the
list (so all can see it and pick any holes needed) is just fine by me.



Cheers
John Summerfield
http://os2.ami.com.au/os2/ for OS/2 support.
Configuration, networking, combined IBM ftpsites index.



More information about the plug mailing list