Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

1 1 was a race-horse, 2 2 was 1 2. When 1 1 1 1 race, 2 2 1 1 2.


devel / comp.lang.awk / Boxed Output

SubjectAuthor
* Boxed OutputMike Sanders
`* Re: Boxed OutputJanis Papanagnou
 `- Re: Boxed OutputMike Sanders

1
Boxed Output

<uibo6n$l7u0$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=1721&group=comp.lang.awk#1721

  copy link   Newsgroups: comp.lang.awk
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder2.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: porkchop@invalid.foo (Mike Sanders)
Newsgroups: comp.lang.awk
Subject: Boxed Output
Date: Mon, 6 Nov 2023 22:09:28 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 68
Sender: Mike Sanders <busybox@sdf.org>
Message-ID: <uibo6n$l7u0$1@dont-email.me>
Injection-Date: Mon, 6 Nov 2023 22:09:28 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="bea9002c59825590baf04d6c11b58fc5";
logging-data="696256"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18D6CtU4cO/N1Sx2VQe4LOE"
Keywords: Mike's Notes
User-Agent: tin/2.6.2-20221225 ("Pittyvaich") (NetBSD/9.3 (amd64))
Cancel-Lock: sha1:SV76ndsRnzTusQIWjMrRfDRHxGc=
 by: Mike Sanders - Mon, 6 Nov 2023 22:09 UTC

Nifty little script...

#!/bin/sh
# # tags: box, sh, shell, awk, code
# # box - awk shell script encases
# output within a formatted box
# Michael Sanders 2023
# https://busybox.neocities.org/notes/box.txt
# # example...
# # +---------------+
# | 3 menu items |
# | |
# | . coffee |
# | . tea |
# | . iced water |
# +---------------+

awk '

{
lines[NR] = $0
current = length($0)
if (current > max) max = current
}

END { box(lines, NR, max) }

function box(ary, num, width, count) {
horizontal(width)
while(++count <= num) vertical(width, ary[count])
horizontal(width)
}

function vertical(width, line) { printf "| %-" width "s |\n", line }

function horizontal(width, x, line) {
line = "+"
for (x = 0; x < width + 2; x++) line = line "-"
print line "+"
}

' <<'DATA'
_
/ \ _-'
_/| \-''- _ /
__-' { | \
/ \
/ "o. |o }
| \ ;
',
\_ __\
''-_ \.//
/ '-____'
/
_'
_-'
DATA

# eof

--
:wq
Mike Sanders

Re: Boxed Output

<uiddke$10ram$2@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=1727&group=comp.lang.awk#1727

  copy link   Newsgroups: comp.lang.awk
Path: i2pn2.org!rocksolid2!news.neodome.net!news.mixmin.net!eternal-september.org!feeder2.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: janis_papanagnou+ng@hotmail.com (Janis Papanagnou)
Newsgroups: comp.lang.awk
Subject: Re: Boxed Output
Date: Tue, 7 Nov 2023 14:21:18 +0100
Organization: A noiseless patient Spider
Lines: 24
Message-ID: <uiddke$10ram$2@dont-email.me>
References: <uibo6n$l7u0$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 7 Nov 2023 13:21:18 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="d631079bd7ce3fe7d8e32b894bc434c1";
logging-data="1076566"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/e2QDvc4mFVPwhyr2htB7k"
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101
Thunderbird/45.8.0
Cancel-Lock: sha1:W/mgNUV6R+QrOaAbY/UZLMayDVA=
In-Reply-To: <uibo6n$l7u0$1@dont-email.me>
 by: Janis Papanagnou - Tue, 7 Nov 2023 13:21 UTC

On 06.11.2023 23:09, Mike Sanders wrote:
> Nifty little script...
> [...]
> ' <<'DATA'
> _
> / \ _-'
> _/| \-''- _ /
> __-' { | \
> / \
> / "o. |o }
> | \ ;
> ',
> \_ __\
> ''-_ \.//
> / '-____'
> /
> _'
> _-'
> DATA

Nice sample data. :-)

Janis

Re: Boxed Output

<uie0hi$14n3d$2@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=1731&group=comp.lang.awk#1731

  copy link   Newsgroups: comp.lang.awk
Path: i2pn2.org!i2pn.org!news.hispagatos.org!eternal-september.org!feeder2.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: porkchop@invalid.foo (Mike Sanders)
Newsgroups: comp.lang.awk
Subject: Re: Boxed Output
Date: Tue, 7 Nov 2023 18:44:02 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 11
Sender: Mike Sanders <busybox@sdf.org>
Message-ID: <uie0hi$14n3d$2@dont-email.me>
References: <uibo6n$l7u0$1@dont-email.me> <uiddke$10ram$2@dont-email.me>
Injection-Date: Tue, 7 Nov 2023 18:44:02 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="71a8db3047af07a88a22f1215a4f4163";
logging-data="1203309"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19J8UtvtFG891qN2dKQazGZ"
User-Agent: tin/2.6.2-20221225 ("Pittyvaich") (NetBSD/9.3 (amd64))
Cancel-Lock: sha1:YRIGYZ6QaC6FCrTlsIaQeiRUklo=
 by: Mike Sanders - Tue, 7 Nov 2023 18:44 UTC

Janis Papanagnou <janis_papanagnou+ng@hotmail.com> wrote:

> Nice sample data. :-)

A friend created that ASCII Art, I'll pass along
the compliment. =)

--
:wq
Mike Sanders

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor