[Vm-dev] finding the latest vm dir on linux
tim at rowledge.org
Thu Jul 28 21:49:20 UTC 2016
I need some shell script help for the upcoming Pi release; we’ve recently changed how the vm directory is named, from /usr/lib/squeak/5.0-abcd 4-digit svn update number based to /usr/lib/squeak/5.0-2016…. date-of-something-in-iso based.
Clearly a naive `ls /usr/lib/squeak/5.0-*/squeak | sort -r | head -1` isn’t going to be helpful if we happen to have an older directory as well as a recent one. So, how does one discriminate effectively?
I’ve considered maybe searching for 5.0-20* so we ‘limit’ ourselves to vms from this century :-) Any neater ways? Is there a way to drop 4-or-less-digit results? Some other magic?
tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
Strange OpCodes: RIW: Re-Invent Wheel
More information about the Vm-dev