

4·
26 days agoThere actually is an array in any POSIX shell. You get one array per file/function. It just feels bad to use it. You can abuse ‘set – 1 2 3 4’ to act as a proper array. You can then use ‘for’ without ‘in’ to iterate over it.
for i; do echo $i; done.
Use shift <number> to pop items off.
If I really have to use something more complex, I’ll reach for mkfifo instead so I can guarantee the data can only be consumed once without manipulating entries.
On this note; given that it’s suspected that Earth has only a good ~800 million years or so left, that may not even be enough time for another sentient species to emerge with enough time to become technologically sufficient enough to … avert extinction – much less undo some of the damage that we have done. We have to grapple with the idea that if we fail as a species, we’ll be the only and last sentient species on Earth to have emerged. Or as I like to call it: Get filtered, nerd.