getKV.sh
325 Bytes
#!/bin/bash
#key,val,filename
path=$(pwd)
for f in `ls $path | grep .properties`
do
cat $f | while read line
do
if [[ "${line:0:1}" != "#" && "$line" != "" ]];then
key=$(echo $line | awk -F '=' '{print $1}')
val=$(echo $line | awk -F '=' '{print $2}')
echo "${key},${val},${f}"
fi
done
done