jutty, to programming
@jutty@bsd.cafe avatar

After a while trying to understand if either ksh or zsh provided a way to prevent taking strings and undefined variables as 0 when doing arithmetic evaluation, there seems to be no feature specifically for it, sadly.

Closest is using set -o nounset (ksh) and setopt no_unset (zsh) to prevent undefined variables from evaluating to zero. If a "string" contains only numbers, a dot and whitespace, it will be treated as a number. Also, if it only contains the name of any other variable and whitespace, it evaluates to that.

Not that I expected shell languages to provide accurate arithmetic.

As a bonus though, it was cool learning about ksh's compound variables, force_float option and especially discipline functions.

awb, to random

There is a new bug fix release of the Korn Shell[1]. Ksh originated as an internal Bell Labs Shell, then as a tool AT&T sold for Unix, and finally the ksh88 version in SVR4 with which AT&T and Sun attempted to merge System V, Xenix, and BSD.

Commercial Unix vendors upgraded to ksh93 and updates ended with ksh93u+ in 2012. Efforts were made to incorporate bug fixes and 93u+m is the most actively maintained continuation.

[1] KornShell 93u+m/1.0.8 https://github.com/ksh93/ksh/releases

bagder, to random
@bagder@mastodon.social avatar

Making it harder to do wrong

is written in C. We try to write better C to reduce the risk of future vulnerabilities.

https://daniel.haxx.se/blog/2023/12/13/making-it-harder-to-do-wrong/

kkarhan,
@kkarhan@mstdn.social avatar

@hramrach @bagder if you think is horrible (I assume you use and/or - which then yes that is a valid argument) then please take a look at , or the original and tell me that's readable.

Tangents aside: Bash, for better or worse, is the for and since I want OS/1337 to be "self-reproducing" / "self-hosting" with as little dependencies as possible, I'm stuck with it.

@OS1337

cjerrington, to Powershell
@cjerrington@mstdn.social avatar

Today I learned: I can SSH from to my machines effortlessly. This is a game changer!

kkarhan,
@kkarhan@mstdn.social avatar

@dataelemental @cjerrington it's just ugly to even look at due to so many inconsistencies.

I'd rather learn and daily drive , , and original instead.

scy, to linux
@scy@chaos.social avatar

The article's title: What exactly was the point of [ “x$var” = “xval” ]?

Me: "Well, cargo culting for people who don't know how to quote in the shell?"

Turns out: no. There are several good reasons why people did this, and the bugs it's been a workaround for have continued to exist into the 2010s.

If you're somewhat proficient in scripting and/or interested in history, this is an awesome read.

https://www.vidarholen.net/contents/blog/?p=1035

mxk, to Bash
@mxk@hachyderm.io avatar

Since I needed to point to it again for work reasons:
If you are writing shell scripts and you think that they are portable, you probably should know this webpage:
https://www.in-ulm.de/~mascheck/various/shells/

nutilius, to random
@nutilius@social.sdf.org avatar

I’m wondering how many people writing programs on under (Unix System Services) using C and library? If you are looking for smell of real Unix development, try to compile here using make (not GNU) pure and sh near to true Born shell (no, it is not ). Anyway curses based menu to present selection list feeding data from stdin is usable from now.

b0rk, (edited ) to random
@b0rk@jvns.ca avatar

if you just stopped being scared of the command line in the last year or three — what helped you?

(no need to reply if you don’t remember, or if you’ve been using the command line comfortably for 15 years — this question isn’t for you :) )

holsta,
@holsta@helvede.net avatar

@b0rk I still learn things after 20+ years and I always pick up new things when I am reading something (man pages, articles) idly rather than looking for a solution to a specific problem.

So well-written/fun documentation I would say?

I only started using CDPATH in this week. By accident.

mdhughes, to random

A new version of the AWK book is coming out! In 2023!
https://awk.dev

josephholsten,
@josephholsten@mstdn.social avatar

@kkarhan @benjamineskola @chimera_linux Bash really is the new , isn’t it.

retropolis, to Podcast Portuguese
@retropolis@bitbang.social avatar
  • All
  • Subscribed
  • Moderated
  • Favorites
  • JUstTest
  • tacticalgear
  • DreamBathrooms
  • thenastyranch
  • magazineikmin
  • Durango
  • cubers
  • Youngstown
  • mdbf
  • slotface
  • rosin
  • ngwrru68w68
  • kavyap
  • GTA5RPClips
  • provamag3
  • ethstaker
  • InstantRegret
  • Leos
  • normalnudes
  • everett
  • khanakhh
  • osvaldo12
  • cisconetworking
  • modclub
  • anitta
  • tester
  • megavids
  • lostlight
  • All magazines