Hi, I am currently using dynamically named variables in order to implement logical hashmaps in pure, POSIX sh. The entries share a common, application specific prefix to mitigate collisions with other environment variables.
However, the hacky syntax I am using for this, involves eval commands. There appear to be other read-based hacks for insert, but I am unable to find a working solution for lookup other than eval. The result is magic looking syntax that is unfriendly for newbies. I would like POSIX to introduce standard commands for insert and lookup of hashmap entries. For example, bash provides the declare command and a pointer parameter expansion syntax that can do this. Not to mention associative arrays. I don't have a dog in the race regarding the exact interface. But I think adding some kind of standard mechanisms for arbitrary hash key insert and lookup in POSIX sh, will help to improve fragility and performance for more scripts. -- Cheers, Andrew