2 # Acept a directory with csvs to parse
5 TARIFICADOR
="/home/the00z/neuroservices/tarificador/put"
8 find "$DIR" -type d |
grep -v -G "^$DIR$" |
sort |
while read SUBDIR
10 TMP
=$
( find "$SUBDIR" -iname '*csv*')
12 # if there are no modified csvs then use the normal csv.
14 if ! CSV
=$
( grep -i 'mod' <<<"$TMP");then
15 if ! CSV
=$
(grep -i 'master.csv' <<<"$TMP"); then
20 CSV
=$
(sed -ne '/\(csv\|mod\)$/p'<<<"$CSV")
21 EDIFICIO
="'$(sed -e 's/^\(.*\/\)\?\([[:digit:]]\+\)[[:space:]].*$/\2/g' \
23 echo "$TARIFICADOR" "'$CSV'" "'$EDIFICIO'" >/dev
/stderr
24 eval "$TARIFICADOR" "'$CSV'" "'$EDIFICIO'"
26 echo '###############################################'