shell handle

#!/bin/bash

#qinrui

 

set -e

commitId=''

repoPath=''

x1=''

 

if [ -f changes15.txt ];then

        #git log |grep -A 2 9acd7d8537191caaf801a59428be5fbf0e110659| grep "Author"

 

        #for i in `cat changes15.txt|grep "changed from" | awk  -F "changed from" '{print $1}'`;do x1=$i;echo $x1;done

        #for i in `cat changes15.txt|grep "changed from" | awk  -F "changed from" '{print $1$6}'`;do echo $i;echo $;cd $i && cd - &&echo 'OK-ruiy';done

 

        #for j in `cat changes15.txt|grep "changed from" | awk  -F "to" '{print $2}'`;do echo $j;for i in `cat changes15.txt|grep "changed from" | awk  -F "changed from" '{print $1}'`;do echo $i;cd $i && cd -;done;done

 

 

 

        #for j in `cat changes15.txt|grep "changed from" | awk  -F "to" '{print $2}'`;do commitId=$j;echo $commitId;for i in `cat changes15.txt|grep "changed from" | awk  -F "changed from" '{print $1}'`;do cd $i ; git log |grep -A 2 $commitId ; cd - > /dev/null;done;done

 

 

 

        for j in `cat changes15.txt|grep "changed from" | awk  -F "to" '{print $2}'`;do commitId=$j;for i in `cat changes15.txt|grep "changed from" | awk  -F "changed from" '{print $1}'`;do repoPath=$i;cd $repoPath && git log | grep -A 2 $commitId && echo $repoPath ; cd - > /dev/null ;done;done

 

 

 

 

        #for i in `cat changes15.txt|grep "changed from" | awk  -F "changed from" '{print $1}'`;do echo $i;cd $i && cd -;done

        #echo "Ok"

else

        echo "no changes15.txt"

fi

相关文章

Centos系统之Shell编程基础知识
从Export理解Shell环境和变量生存期
linux shell数组变量、类型及规则
Centos编程Shell基本工作原理方案
Centos操作系统编程之Shell 问答录
rsync-linux备份脚本