Chris F.A. Johnson
Unix shell programming notes

8 January 2013

Array manipulation functions

I have spent a bit of time playing around with functions to manipulate arrays. There are functions that treat an array as a stack (e.g. pop and push); functions to insert and remove an element; functions to move elements around, etc..

In all these functions, the array (or arrays) will be passed by reference, i.e. its name, rather than a list of its elements, and often modifies the array itself.

The functions haven't been thoroughly tested (there's a framework for a test suite here), and they should have more documentation. I'd like to add some examples. But I don't know whether or not I'll spend any more time on either the functions or this section of my website.

Modified 29 Jun 2015