str = 'master 7ecbf3f [origin/master: ahead 8, behind 1] local'
1.如何取到[ ]之间的字符串origin/master: ahead 8, behind 1?2.如何判断1中取到的字符串包含behind或者diverged?shell太销魂了,求解!
origin/master: ahead 8, behind 1
behind
diverged
慕侠2389804
相关分类