标签:style code soft for bin sof shel pre sed
git branch|sed ‘s/*/ /g‘|xargs -i git grep -n master {}
shell的写法:
#!/bin/bash a=$(git branch|sed ‘s/*/ /g‘) for i in ${a} do git grep -n master $i done
-n:把含有这个字符串所在的行数显示出来
标签:style code soft for bin sof shel pre sed
原文地址:http://www.cnblogs.com/lemon-le/p/6069067.html