From: Eckard Brauer <eckard.brauer@gmx.de>
To: 9front@9front.org
Subject: Re: [9front] werc/apps/wman botches some man page links
Date: Sun, 12 Aug 2018 18:50:28 +0200 [thread overview]
Message-ID: <20180812185028.1b7ffa50@gmx.de> (raw)
In-Reply-To: <3638FBEF9AC44BA220720D0E4D3CDE45@ewsd.inri.net>
[-- Attachment #1: Type: text/plain, Size: 1167 bytes --]
Am Thu, 9 Aug 2018 21:21:11 -0400
schrieb sl@stanleylieber.com:
> Previous message garbled. Full article here:
>
> http://plan9.stanleylieber.com/werc/apps/wman/linewraps
>
> sl
Writing that with some reservation because currently only using
plan9port (will have to repair my p9 system):
When setting RS to \0 awk is taking paragraphs separated by empty lines
each time, so I simply iterated over a whole paragraph each time.
Problems are, that (1) gsub doesn't have sub-patterns and gensub isn't
available, so I had to do all by hand:
awk -v RS='\0' 'function stripoff(str, num) {
str = substr(str, num, length(str)-num+1)
sub("^ *", "", str)
return str }
/[a-z]-\n *[a-z]/ {
for (s=$0; i=index(s, "-\n "); s=stripoff(s, i+2)) {
printf("%s",substr(s,1,i-1)) }
print s "\n"
next }
1'
So maybe it's also possible to integrate the following sed and awk
stuff there - I'd try it if the above is of any help.
--
:)
[-- Attachment #2: Digitale Signatur von OpenPGP --]
[-- Type: application/pgp-signature, Size: 195 bytes --]
next parent reply other threads:[~2018-08-12 16:50 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <3638FBEF9AC44BA220720D0E4D3CDE45@ewsd.inri.net>
2018-08-12 16:50 ` Eckard Brauer [this message]
[not found] <FA9BA3B9FCBF4FA28D3066A7570CD898@ewsd.inri.net>
2018-08-15 13:08 ` Ethan A. Gardener
2018-08-15 13:41 ` Stanley Lieber
2018-08-15 13:44 ` Stanley Lieber
2018-08-16 15:51 ` Ethan A. Gardener
2018-08-14 16:40 sl
-- strict thread matches above, loose matches on Subject: below --
2018-08-14 16:38 sl
2018-08-14 4:49 Travis Moore
2018-08-13 8:26 Travis Moore
2018-08-13 14:23 ` Stanley Lieber
[not found] <6660A841262D98FFBB4792A0F0CB0E5D@ewsd.inri.net>
2018-08-10 8:47 ` Ethan A. Gardener
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180812185028.1b7ffa50@gmx.de \
--to=eckard.brauer@gmx.de \
--cc=9front@9front.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).