On the Bourne shell's distinction between shell variables and exported ones
One of the famous things that people run into with the Bourne shellis that it draws a distinction between plain shell variables andspecial exported shell variables , which are put into the environmentof processes started by the shell. This distinction is a source offrustration when you set a variable, run a program, and the programdoesn't have the variable available to it:
$ GODEBUG=...$ go-program[doesn't see your $GODEBUG setting]
It's also a source of mysterious
How to redirect a Bash process substitution into a <code>while</code> loop
In some sorts of shell scripts, you often find yourself wanting towork through a bunch of input in the shell; some examples of thisfor me are here and here . One of the tools for this is a' while read -r ... ' loop, using the shell's builtin read topull in one or more fields of data ( hopefully not making a mistake ).Suppose, not hypothetically, that you have a situation where youwant to use such a ' while read ' loop to
With disk caches, you want to be able to attribute hits and misses
Suppose that you have a disk or filesystem cache in memory (whichyou do, since pretty much everything has one these days). Most diskcaches will give you simple hit and miss information as part oftheir basic information, but if you're interested in the performanceof your disk cache (or in improving it), you want more information.The problem with disk caches is that there are a lot of differentsources and types of disk IO, and you can have hit rates that aredrastically different between
Systemd resource controls on user.slice and system.slice work fine
We have a number of systems where we traditionally set strictovercommit handling , and for some time thishas caused us some heartburn . Someyears ago I speculated that we might want to use resource controlson user.slice or systemd.slice if they worked , and then recently in a comment here I speculated that this was the way to(relatively) safely limit memory use if it worked.
Well, it does (as far as I can tell, without deep testing). If youwant to limit how much
Gnome, GSettings, gconf, and which one you want
On the Fediverse a while back, I said :
Ah yes, GNOME, it is of course my mistake that I used gconf-editorinstead of dconf-editor. But at least now Gnome-Terminal no longerintercepts F11, so I can possibly use g-t to enter F11 into serialconsoles to get the attention of a BIOS. If everything works in UEFIland.
Gnome has had at least two settings systems, GSettings / dconf ( also ) and the older GConf . If you
PDUs can fail (eventually) and some things related to this
Early last Tuesday there was a widespread power outage at work , which took outpower to our machine rooms for about four hours. Most things cameback up when the power was restored, but not everything. One of thethings that had happened was that one of our rack PDUs had failed.Fixing this took a surprising amount of work.
We don't normally think about our PDUs very much. They sit there,acting as larger and often smarter versions of power bars, and just,well, work.
The importance of limiting syndication feed requests in some way
People sometimes wonder why I care so much about HTTP conditionalGETs and rate limiting for syndication feed fetchers. There are multiplereasons, including social reasons to establish norms , but one obvious one is transfervolumes. To illustrate that, I'll look at the statistics for yesterdayfor feed fetches of the main syndication feed for WanderingThoughts .
Yesterday there were 7492 feed requests that got HTTP 200 responses,9419 feed requests that got HTTP 304 Not Modified responses, and1
Consider mentioning your little personal scripts to your co-workers
I have a habit of writing little scripts at work for my own use(perhaps like some number of my readers). They pile up like snowdriftsin my $HOME/adm, except they don't melt away when their time isdone but stick around even when they're years obsolete. Every sooften I mention one of them to my co-workers; sometimes my co-workersaren't interested, but sometimes they find the script appealing andhave me put it into our shared location for
Parsing hours and minutes into a useful time in basic Python
Suppose, not hypothetically, that you have a program that optionallytakes a time in the past to, for example, report on things as ofthat time instead of as of right now. You would like to allow peopleto specify this time as just 'HH:MM', with the meaning being thattime today (letting people do 'program --at 08:30'). This isconvenient for people using your program but irritatingly hardtoday with the Python standard library.
(In the
How GNU Tar handles deleted things in incremental tar archives
Suppose, not hypothetically, that you have a system that uses GNUTar for its full and incremental backups (such as Amanda ). Or maybe youuse GNU Tar directly for this. If you have an incremental backuptar archive, you might be interested in one or both of two questions,which are in some ways mirrors of each other: what files were deletedbetween the previous incremental and this incremental, or what'sthe state of the directory tree as of this incremental (if it andall previous backups