commit - 72862ecf9ce7f62a2cc15524538f6f6619c83bf7
commit + 9439a9901031adbd5c05fec5a5f692144bb3fd53
blob - e95df3908f366957e8608730cd2dc49e62155ac0
blob + aa03589cae17845657ef3efe99e9b11b314d2dca
--- regress/cmdline/common.sh
+++ regress/cmdline/common.sh
trim_obj_id()
{
- let trimcount=$1
- id=$2
+ local trimcount=$1
+ local id=$2
- pat=""
- while [ trimcount -gt 0 ]; do
+ local pat=""
+ while [ "$trimcount" -gt 0 ]; do
pat="[0-9a-f]$pat"
- let trimcount--
+ trimcount=$((trimcount - 1))
done
echo ${id%$pat}