对于固定的前缀长度,我可以这样做:
[ a${filename:0:2} = a.# ] && echo temporary emacs file
如何为任意前缀做到这一点?
有更干净的方式吗?
string bash
bash ×1
string ×1