This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cat 24DSF.txt | grep -E "^(\s|\d){18}[3|4|5]" | cut -c8- | awk '{print substr($1,1,11) "\t" $2}' | sed "s/,/./g" | awk '{a[$1] += $2} END{for (i in a) print i, a[i]}' | sort -k 2 -n -r > mayores_deudores.txt | |
# cat 24DSF.txt | |
# Imprime en terminal el contenido del archivo. | |
# | |
# grep -E "^(\s|\d){18}[3|4|5]" | |
# Trae parte de la línea que me interesa y se fija que haya deuda (3 situación "con problemas" hasta 5 "irrecuperable"), 0 no me interesa. | |
# IMPORTANTE: morosos importantes son 3|4|5. | |
# | |
# cut -c8- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30500959629 33336125 | |
30507950848 26274672 | |
30552587827 10731035 | |
30710853831 8732222 | |
30710964013 6630533 | |
30501466464 4988354 | |
30553613147 3170601 | |
30628323603 2257802 | |
30661758410 2142888 | |
30709211826 1924233 |