${file:0:5}:提取最左边的5个字节:/dir1${file:5:5}:提取第5个字节右边的连续5个字节:/dir2
例子:
pval=12345678
r=${pval:0:2}
echo $r #12
r=${pval:2:2}
echo $r #34