• 注册
    • 查看作者
    • 一个git记录提交shell脚本

      创建个时间文件

      cat test.txt
      20200121 12:15:20
      20200212 12:25:30
      20200313 08:35:30

      shell脚本

      IFS_old=$IFS
      IFS=$'\n'
      for line in $(cat test.txt)  
      do  
        echo  $line;
      
        date -s "$line"
      time=$[$RANDOM%5+20]
      echo $time
      sleep $time
      
      cd /root/test-install/
      echo "$line"> test.txt
      
      git add . -A
      git commit -m "update"
      git push origin master
      done 
      
      IFS=$IFS_old

    • 0
    • 0
    • 0
    • 997
    • 请登录之后再进行评论

      登录
    • 做任务
    • 实时动态
    • 偏好设置
    • 单栏布局 侧栏位置: