OK, one remaining bug in that was resolved in https://paste.ubuntu.com/p/sgqJ5dFg5D/. (If there are no matches for the pattern in the for loop, we still go through it once with the static string as $disk, which readlink -f doesn't error on.)
Since writing the above, I've realised that we probably just want to use `readlink -e`, which I'm working on now.
OK, one remaining bug in that was resolved in https:/ /paste. ubuntu. com/p/sgqJ5dFg5 D/. (If there are no matches for the pattern in the for loop, we still go through it once with the static string as $disk, which readlink -f doesn't error on.)
Since writing the above, I've realised that we probably just want to use `readlink -e`, which I'm working on now.