These are short observations on Linux, it's use, programming, operation, and configuration. Mostly, they are derived from my own experiences installing, configuring and using Linux systems, from embedded systems to desktops to servers.
Back in October, 2018, a discussion in the usenet comp.lang.c newsgroup addressed (among other things) the original poster's complaint about the return value of the C standard strcmp() function. The poster contended that the strcmp() function should return one of three values: -1 if the first string was lexically "less than" the second string, 0 if the strings were lexically "equal", and +1 if the first string was lexically "greater than" the second string.
I've recently taken up writing some C code to access mysql databases. One tedious part of that process is the preparation of query statements (not "prepared statement" queries, however) using program-supplied values.
Coding in sh or bash can be challenging. Here are some tricks I've learned over the years
Extracting fields from lists
I have a list of items in $LIST; each item is separated from each other item by a comma, and individual items may contain spaces.
~ $ LIST="abc,def ghi,jkl"
~ $ echo [$LIST]
[abc,def ghi,jkl]
On response to a trigger on one web page, I want to use PHP to generate and display a new web page, and at the same time, send an associated file as a download.
For example, the user selects an "Export recipes" option in a PHP/MySQL web-based recipe management application, which causes
the page to change to a "Download in progress" page, and
a file containing the selected recipes to be sent to the client's browser to be saved as a "download".
A friend is trying to set up his home computer to expose a website to the internet, and is having some problems getting it to work. In assisting him, I realized that some of the information I've given him may be of use to others.