1 | grep -r "public class *" . | grep -vE "Example|implements Serializable" | awk -F ":" '{print $1}' | xargs -I {} sed -i "" "/public class/i\ |
参考:
http://www.361way.com/sed-process-lines/2263.html
http://blog.csdn.net/cbbbc/article/details/50474947
1 | grep -r "public class *" . | grep -vE "Example|implements Serializable" | awk -F ":" '{print $1}' | xargs -I {} sed -i "" "/public class/i\ |
参考:
http://www.361way.com/sed-process-lines/2263.html
http://blog.csdn.net/cbbbc/article/details/50474947