Authored by chunhua.zhang

auto push by shell

  1 +#!/bin/bash
  2 +#key,val,filename
  3 +path=$(pwd)
  4 +
  5 +for f in `ls $path | grep .properties`
  6 +do
  7 + cat $f | while read line
  8 + do
  9 + if [[ "${line:0:1}" != "#" && "$line" != "" ]];then
  10 + key=$(echo $line | awk -F '=' '{print $1}')
  11 + val=$(echo $line | awk -F '=' '{print $2}')
  12 + echo "${key},${val},${f}"
  13 + fi
  14 + done
  15 +done