@clayton

lol nah, that's already out there. I mean, the official published manual is pretty decent, although what I actually learned on was The Korn Shell by Anatole Olczak 25 years ago:

https://archive.org/details/kornshelluserand00olcz

I'm actually trying to write in POSIX shell and (when appropriate) ksh a bit more, since bash isn't in the base install of any of the BSDs, AFAIK.

The thing I do like about bash (other than the advanced scripting features over POSIX) is that it's a single project, vs a multitude POSIX shell implimentations, and even a good handful of ksh forks.

P.S. Forgot to mention that I actually try to make all my bash init/rc files executable in ksh as well, although I've gotten lazy and started using a couple bash-only features, like built-in regex (SOOOO nice!)

#ksh

The Korn shell : user and programming manual : Olczak, Anatole : Free Download, Borrow, and Streaming : Internet Archive

Published for Addison Wesley Longman Limited by ASP Inc.

Internet Archive

Very behind on toot notifications, but I'll respond when able. XD

Got stuck in an #ADHD #Hyperfocus vortex trying to code my own version of Linux' free(1) in #ksh, because the free in the pkg repo isn't great.

I think I was at it for two hours until half an hour ago. đŸ€Šâ€â™‚ïž đŸ„±

And NOW I just realized that the free I've been using in #FreeBSD is one of my own scripts as well, which I probably could have just adapted for OpenBSD with maybe minimal fuss, LOL.

Meteorology Kwamalasemutu

Current weather in Kwamalasemutu SR SA with infinite power of wttr.in & the grace of lolcat(6) đŸłïžâ€đŸŒˆ wttr curl(1) & {ba{c{k{z{fi}}}}}sh

Background photograph is a Clouds in FL scene composed with CIRC_POL FL and UV filters stacked using a Nikon zoom lens

log

$ curl --verbose wttr.in/kwamalasemutu|lolcat
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* Host wttr.in:80 was resolved.

  • IPv6: (none)
  • IPv4: 5.9.243.187
  • Trying 5.9.243.187:80...0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* Connected to wttr.in (5.9.243.187) port 80
  • using HTTP/1.x> GET /kwamalasemutu HTTP/1.1> Host: wttr.in> User-Agent: curl/8.14.1> Accept: />
  • Request completely sent off< HTTP/1.1 200 OK< Access-Control-Allow-Origin: *< Cache-Control: public, max-age=600< Content-Type: text/plain; charset=utf-8< Date: Sat, 23 May 2026 15:11:48 GMT< Transfer-Encoding: chunked< { [2583 bytes data]100 9019 0 9019 0 0 7744 0 --:--:-- 0:00:01 --:--:-- 7748
  • Connection #0 to host wttr.in left intactWeather report: kwamalasemutu

`/"".-. Light rain shower
,_( ). +29(32) °C
/(() ← 6 km/h
‘ ‘ ‘ ‘ 10 km
‘ ‘ ‘ ‘ 1.2 mm

Location: Kwamalasemutu, Coeroeni, Sipaliwini, Suriname [2.3554503,-56.787836]

Note:

Remember to repeat the request with an interval of 12 then 54 secs when the server sends and empty response to curl
Watch the LOG!

API

https://wttr.in

https://en.wikipedia.org/wiki/Bash_(Unix_shell)

https://gnu.org

https://directory.fsf.org/wiki/Bash

https://curl.se/

https://github.com/busyloop/lolcat

Z

#Weather #wttr #lolcat #curl #bash #csk #ksh #zsh #sh #fish #meteorology #environment #Physics #Chemistry #Mathematics #Lineair #algebra #technology #OpenSource #programming #POSIX

Today, I discovered #bash and #ksh extglobs. Very powerful, almost as good as regex!

From BASH(1):

If the extglob shell option is enabled using the shopt builtin, the shell recognizes several extended pattern matching operators. In the following description, a pattern-list is a list of one or more patterns separated by a |. Composite patterns may be formed using one or more of the following sub-patterns: ?(pattern-list) Matches zero or one occurrence of the given patterns. *(pattern-list) Matches zero or more occurrences of the given patterns. +(pattern-list) Matches one or more occurrences of the given patterns. @(pattern-list) Matches one of the given patterns. !(pattern-list) Matches anything except one of the given patterns.

Meteorology

Current weather in Palmentuin SR SA with forza magnifica of wttr.in & the grace beauty & colours of lolcat(6) đŸłïžâ€đŸŒˆ wttr curl(1) & {ba{c{k{z{fi}}}}}sh

Background photograph is a wonderful Mandelbrot /Julia set virtual island composed with Open Source tools nice -20 fractive nice -1 thunar {{see my fractal toots for specific parameters}}

log

$ curl --verbose wttr.in/palmentuin|lolcat
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* Host wttr.in:80 was resolved.

  • IPv6: (none)
  • IPv4: 5.9.243.187
  • Trying 5.9.243.187:80...
  • Connected to wttr.in (5.9.243.187) port 80
  • using HTTP/1.x0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0> GET /palmentuin HTTP/1.1> Host: wttr.in> User-Agent: curl/8.14.1> Accept: />
  • Request completely sent off< HTTP/1.1 200 OK< Access-Control-Allow-Origin: *< Cache-Control: public, max-age=600< Content-Type: text/plain; charset=utf-8< Date: Sat, 09 May 2026 13:18:12 GMT< Transfer-Encoding: chunked< { [2583 bytes data]100 9105 0 9105 0 0 18242 0 --:--:-- --:--:-- --:--:-- 18246
  • Connection #0 to host wttr.in left intact
    Weather report: palmentuin

    \ / Partly cloudy
    _ /"".-. +26(29) °C
    _( ). ← 10 km/h
    /(__(_) 10 km
    0.7 mm

Location: Palmentuin, Kleine Waterstraat, Rainville, Paramaribo, Suriname [5.8279231,-55.1499095]

Note:

Remember to always repeat the request with an interval of 12 then 64 secs when the server sends and empty response to curl, watch the LOG!

API

https://wttr.in

https://en.wikipedia.org/wiki/Bash_(Unix_shell)

https://gnu.org

https://directory.fsf.org/wiki/Bash

https://curl.se/

https://github.com/busyloop/lolcat

Z

#Weather #wttr #lolcat #curl #bash #csk #ksh #zsh #sh #fish #meteorology #environment #Physics #Chemistry #Mathematics #Lineair #algebra #technology #OpenSource #programming #POSIX

Meteorology

Current weather in Leonsberg SR SA with magnifico power of wttr.in & the passion grace beauty & colours of lolcat(6) đŸłïžâ€đŸŒˆ wttr curl(1) & {ba{c{k{z{fi}}}}}sh

Background photograph is the magenta Sunset at Waterkant scene composed with CIRC_POL {circular polarizer} FL {fluorescent} and UV {ultra violet} filters stacked using Nikon prime hardware

log

$ curl -v wttr.in/leonsberg_suriname|lolcat
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* Host wttr.in:80 was resolved.

  • IPv6: (none)
  • IPv4: 5.9.243.187
  • Trying 5.9.243.187:80...
  • Connected to wttr.in (5.9.243.187) port 80
  • using HTTP/1.x> GET /leonsberg_suriname HTTP/1.1> Host: wttr.in> User-Agent: curl/8.14.1> Accept: />
  • Request completely sent off< HTTP/1.1 200 OK< Access-Control-Allow-Origin: *< Cache-Control: public, max-age=600< Content-Type: text/plain; charset=utf-8< Date: Sat, 09 May 2026 10:21:18 GMT< Transfer-Encoding: chunked< { [1195 bytes data]100 9080 0 9080 0 0 10526 0 --:--:-- --:--:-- --:--:-- 10521
  • Connection #0 to host wttr.in left intact
    Weather report: leonsberg_suriname

    \ / Partly cloudy
    _ /"".-. +23(26) °C
    _( ). ← 8 km/h
    /(__(_) 10 km
    0.2 mm

Location: Leonsberg, Blauwgrond, Suriname [5.8692506,-55.1026346]

Note:

Remember to repeat the request with an interval of 16 then 96 secs when the server sends and empty response to curl, watch the LOG!

API

https://en.wikipedia.org/wiki/Bash_(Unix_shell)

https://wttr.in

https://gnu.org

https://directory.fsf.org/wiki/Bash

https://curl.se/

https://github.com/busyloop/lolcat

Z

#Weather #wttr #lolcat #curl #bash #csk #ksh #zsh #sh #fish #meteorology #environment #Physics #Chemistry #Mathematics #Lineair #algebra #technology #OpenSource #programming #POSIX

Meteorology

Current weather in Palmentuin SR SA with forza magnifica de wttr.in & the grace beauty & colours of lolcat(6) đŸłïžâ€đŸŒˆ wttr curl(1) & {ba{c{k{z{fi}}}}}sh

Background composition is an advanced Mandelbrot Julia scenic field composed with complex Algebra in an Open Source fractal generator

log

$ curl --verbose wttr.in/palmentuin|lolcat
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* Host wttr.in:80 was resolved.

  • IPv6: (none)
  • IPv4: 5.9.243.187
  • Trying 5.9.243.187:80...0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* Connected to wttr.in (5.9.243.187) port 80
  • using HTTP/1.x> GET /palmentuin HTTP/1.1> Host: wttr.in> User-Agent: curl/8.14.1> Accept: />
  • Request completely sent off< HTTP/1.1 200 OK< Access-Control-Allow-Origin: *< Cache-Control: public, max-age=600< Content-Type: text/plain; charset=utf-8< Date: Thu, 07 May 2026 22:06:30 GMT< Transfer-Encoding: chunked< { [8067 bytes data]100 9028 0 9028 0 0 10904 0 --:--:-- --:--:-- --:--:-- 10903
  • Connection #0 to host wttr.in left intact
    Weather report: palmentuin

    \ / Clear
    .-. +29(35) °C
    ― ( ) ― ↙ 12 km/h
    `-’ 10 km
    / \ 0.0 mm

Location: Palmentuin, Kleine Waterstraat, Rainville, Paramaribo, Suriname [5.8279231,-55.1499095]

Note:

Remember to repeat the request with an interval of 9 then 54 secs when the server sends and empty response to curl, watch the LOG!

API

https://wttr.in

https://en.wikipedia.org/wiki/Bash_(Unix_shell)

https://gnu.org

https://directory.fsf.org/wiki/Bash

https://curl.se/

https://github.com/busyloop/lolcat

Z

#Weather #wttr #lolcat #curl #bash #csk #ksh #zsh #sh #fish #meteorology #environment #Physics #Chemistry #Mathematics #Lineair #algebra #technology #OpenSource #programming #POSIX

Meteorology

Current weather in Apetina SR SA with infinite power of wttr.in & the grace of lolcat(6) đŸłïžâ€đŸŒˆ wttr curl(1) & {ba{c{k{z{fi}}}}}sh

Background photograph is a Mandelbrot Julia scene composed with advanced Mathematics in fraqtive

log

$ curl --verbose wttr.in/apetina|lolcat
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* Host wttr.in:80 was resolved.

  • IPv6: (none)
  • IPv4: 5.9.243.187
  • Trying 5.9.243.187:80...
  • Connected to wttr.in (5.9.243.187) port 80
  • using HTTP/1.x> GET /apetina HTTP/1.1> Host: wttr.in> User-Agent: curl/8.14.1> Accept: />
  • Request completely sent off< HTTP/1.1 200 OK< Access-Control-Allow-Origin: *< Cache-Control: public, max-age=600< Content-Type: text/plain; charset=utf-8< Date: Thu, 07 May 2026 17:11:25 GMT< Transfer-Encoding: chunked< { [2583 bytes data]100 8902 0 8902 0 0 9720 0 --:--:-- --:--:-- --:--:-- 9718
  • Connection #0 to host wttr.in left intactWeather report: apetina

`/"".-. Light rain shower
,_( ). +30(33) °C
/(() ↓ 8 km/h
‘ ‘ ‘ ‘ 10 km
‘ ‘ ‘ ‘ 0.4 mm

Location: Apetina, Tapanahony, Sipaliwini, Suriname [3.5110538,-55.0515685]

Note:

Always remember to repeat the request with an interval of 16 then 64 secs when the server sends and empty response to curl, watch the LOG!

API

https://wttr.in

https://en.wikipedia.org/wiki/Bash_(Unix_shell)

https://gnu.org

https://directory.fsf.org/wiki/Bash

https://curl.se/

https://github.com/busyloop/lolcat

Z

#Weather #wttr #lolcat #curl #bash #csk #ksh #zsh #sh #fish #meteorology #environment #Physics #Chemistry #Mathematics #Lineair #algebra #technology #OpenSource #programming #POSIX

@rl_dane

The alternative is to make the shell handle the un-escaping:

echo hello,there |sed 's/,/'"\n"'/g'

It's undocumented in several ksh flavours, but nonetheless works. However, those flavours also (trying a quick few tests) support the better way, which is also undocumented though:

echo hello,there |sed $'s/,/\n/g'

#sed #UnixShells #KornShell #OpenBSD #ksh