Someone
public text v1 · immutableunset x
for i in /tmp/todisc-work[0-9]*; do
echo suffix[x++]=$(awk -F 'k' '{print $2}' <<< "$i")
done
new_suffix=0
for s in ${suffix[@]}; do
((s > new_suffix)) && new_suffix=$((s+1))
doneunset x
for i in /tmp/todisc-work[0-9]*; do
echo suffix[x++]=$(awk -F 'k' '{print $2}' <<< "$i")
done
new_suffix=0
for s in ${suffix[@]}; do
((s > new_suffix)) && new_suffix=$((s+1))
done