From 18b3fb0cfbec8eb262ae797ca617f0bc78fa9251 Mon Sep 17 00:00:00 2001 From: Tiago Carreira Date: Fri, 18 Oct 2024 20:31:33 +0100 Subject: [PATCH] =?UTF-8?q?manter=20formata=C3=A7=C3=A3o=20do=20README?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/01-parlamento.sh | 2 +- scripts/02-economia.sh | 4 ++-- scripts/07-lisboa-pdf.sh | 2 +- scripts/09-financas.sh | 2 +- scripts/12-autentic.sh | 2 +- scripts/14-mai.sh | 2 +- scripts/15-rcaap.sh | 2 +- scripts/16-saude.sh | 2 +- scripts/19-igcp.sh | 2 +- scripts/20-viva.sh | 2 +- scripts/25-eleicoes.sh | 2 +- scripts/26-snirh.sh | 2 +- scripts/29-inpi.sh | 2 +- scripts/35-turismo.sh | 2 +- scripts/36-norte2020.sh | 2 +- scripts/40-sef.sh | 2 +- scripts/48-insa.sh | 2 +- scripts/50-bud.sh | 2 +- scripts/51-dgeg.sh | 2 +- scripts/52-covid.sh | 2 +- 20 files changed, 21 insertions(+), 21 deletions(-) diff --git a/scripts/01-parlamento.sh b/scripts/01-parlamento.sh index 3ce3f09..997016a 100755 --- a/scripts/01-parlamento.sh +++ b/scripts/01-parlamento.sh @@ -32,7 +32,7 @@ if [ $((a + b)) -eq "0" ]; then while IFS='' read -r line || [[ -n "$line" ]]; do test $(echo "$line"|grep -v www.parlamento.pt|wc -l) -eq "1" \ && echo "$line" \ - || (h=$(echo "$line"|cut -d\| -f1-4); t=$(echo "$line"|cut -d\| -f6-); echo "$h| $(date +%Y/%m/%d) |$t"); + || (h=$(echo "$line"|cut -d\| -f1-4); t=$(echo "$line"|cut -d\| -f6-); nc=$(echo "$line"|cut -d\| -f5 | wc -m); printf "%s| %-$((nc-2))s|%s\n" "$h" "$(date +%Y/%m/%d)" "$t"); done < README.md > new mv new README.md else diff --git a/scripts/02-economia.sh b/scripts/02-economia.sh index a7595e4..d2b5adf 100755 --- a/scripts/02-economia.sh +++ b/scripts/02-economia.sh @@ -1,7 +1,7 @@ #!/bin/bash fail=0; -if [ "$(curl https://www.dgae.gov.pt -o /dev/null; echo $?)" -eq "60" ]; then +if [ "$(curl -s https://www.dgae.gov.pt -o /dev/null; echo $?)" -eq "60" ]; then echo "economia: problema com o certificado SSL"; fail=1; elif [ "$(curl -s -I https://www.dgae.gov.pt/gestao-de-ficheiros-externos-dgae-ano-2015/1_formulario-registo_mf_nao_harmonizadas-doc.aspx|grep filename|cut -d= -f2| tr -d '\r')" == "i010066.doc" ]; then @@ -16,7 +16,7 @@ else while IFS='' read -r line || [[ -n "$line" ]]; do test $(echo "$line"|grep -v min-economia|wc -l) -eq "1" \ && echo "$line" \ - || (h=$(echo "$line"|cut -d\| -f1-4); t=$(echo "$line"|cut -d\| -f6-); echo "$h| $(date +%Y/%m/%d) |$t"); + || (h=$(echo "$line"|cut -d\| -f1-4); t=$(echo "$line"|cut -d\| -f6-); nc=$(echo "$line"|cut -d\| -f5 | wc -m); printf "%s| %-$((nc-2))s|%s\n" "$h" "$(date +%Y/%m/%d)" "$t"); done < README.md > new mv new README.md fi diff --git a/scripts/07-lisboa-pdf.sh b/scripts/07-lisboa-pdf.sh index 2778f9e..c149564 100755 --- a/scripts/07-lisboa-pdf.sh +++ b/scripts/07-lisboa-pdf.sh @@ -10,7 +10,7 @@ else while IFS='' read -r line || [[ -n "$line" ]]; do test $(echo "$line"|grep -v www.cm-lisboa|wc -l) -eq "1" \ && echo "$line" \ - || (h=$(echo "$line"|cut -d\| -f1-4); t=$(echo "$line"|cut -d\| -f6-); echo "$h| $(date +%Y/%m/%d) |$t"); + || (h=$(echo "$line"|cut -d\| -f1-4); t=$(echo "$line"|cut -d\| -f6-); nc=$(echo "$line"|cut -d\| -f5 | wc -m); printf "%s| %-$((nc-2))s|%s\n" "$h" "$(date +%Y/%m/%d)" "$t"); done < README.md > new mv new README.md fi diff --git a/scripts/09-financas.sh b/scripts/09-financas.sh index 66766dd..38bfa5b 100755 --- a/scripts/09-financas.sh +++ b/scripts/09-financas.sh @@ -38,7 +38,7 @@ if [ "$((a + b + c))" -eq "0" ]; then while IFS='' read -r line || [[ -n "$line" ]]; do test $(echo "$line"|grep -v financas|wc -l) -eq "1" \ && echo "$line" \ - || (h=$(echo "$line"|cut -d\| -f1-4); t=$(echo "$line"|cut -d\| -f6-); echo "$h| $(date +%Y/%m/%d) |$t"); + || (h=$(echo "$line"|cut -d\| -f1-4); t=$(echo "$line"|cut -d\| -f6-); nc=$(echo "$line"|cut -d\| -f5 | wc -m); printf "%s| %-$((nc-2))s|%s\n" "$h" "$(date +%Y/%m/%d)" "$t"); done < README.md > new mv new README.md else diff --git a/scripts/12-autentic.sh b/scripts/12-autentic.sh index 75b0c4d..0b9ae26 100755 --- a/scripts/12-autentic.sh +++ b/scripts/12-autentic.sh @@ -10,7 +10,7 @@ else while IFS='' read -r line || [[ -n "$line" ]]; do test $(echo "$line"|grep -v autenticacao|wc -l) -eq "1" \ && echo "$line" \ - || (h=$(echo "$line"|cut -d\| -f1-4); t=$(echo "$line"|cut -d\| -f6-); echo "$h| $(date +%Y/%m/%d) |$t"); + || (h=$(echo "$line"|cut -d\| -f1-4); t=$(echo "$line"|cut -d\| -f6-); nc=$(echo "$line"|cut -d\| -f5 | wc -m); printf "%s| %-$((nc-2))s|%s\n" "$h" "$(date +%Y/%m/%d)" "$t"); done < README.md > new mv new README.md fi diff --git a/scripts/14-mai.sh b/scripts/14-mai.sh index 93ae4fb..cf0285a 100755 --- a/scripts/14-mai.sh +++ b/scripts/14-mai.sh @@ -22,7 +22,7 @@ else while IFS='' read -r line || [[ -n "$line" ]]; do test "$(echo "$line"|grep -c -v sg.mai)" -eq "1" \ && echo "$line" \ - || (h=$(echo "$line"|cut -d\| -f1-4); t=$(echo "$line"|cut -d\| -f6-); echo "$h| $(date +%Y/%m/%d) |$t"); + || (h=$(echo "$line"|cut -d\| -f1-4); t=$(echo "$line"|cut -d\| -f6-); nc=$(echo "$line"|cut -d\| -f5 | wc -m); printf "%s| %-$((nc-2))s|%s\n" "$h" "$(date +%Y/%m/%d)" "$t"); done < README.md > new mv new README.md fi diff --git a/scripts/15-rcaap.sh b/scripts/15-rcaap.sh index 014c811..3ed0e81 100755 --- a/scripts/15-rcaap.sh +++ b/scripts/15-rcaap.sh @@ -6,7 +6,7 @@ else while IFS='' read -r line || [[ -n "$line" ]]; do test $(echo "$line"|grep -v rcaap|wc -l) -eq "1" \ && echo "$line" \ - || (h=$(echo "$line"|cut -d\| -f1-4); t=$(echo "$line"|cut -d\| -f6-); echo "$h| $(date +%Y/%m/%d) |$t"); + || (h=$(echo "$line"|cut -d\| -f1-4); t=$(echo "$line"|cut -d\| -f6-); nc=$(echo "$line"|cut -d\| -f5 | wc -m); printf "%s| %-$((nc-2))s|%s\n" "$h" "$(date +%Y/%m/%d)" "$t"); done < README.md > new mv new README.md fi diff --git a/scripts/16-saude.sh b/scripts/16-saude.sh index 05d2fe1..2d0d73a 100755 --- a/scripts/16-saude.sh +++ b/scripts/16-saude.sh @@ -10,7 +10,7 @@ else while IFS='' read -r line || [[ -n "$line" ]]; do test $(echo "$line"|grep -v servicos.min-saude|wc -l) -eq "1" \ && echo "$line" \ - || (h=$(echo "$line"|cut -d\| -f1-4); t=$(echo "$line"|cut -d\| -f6-); echo "$h| $(date +%Y/%m/%d) |$t"); + || (h=$(echo "$line"|cut -d\| -f1-4); t=$(echo "$line"|cut -d\| -f6-); nc=$(echo "$line"|cut -d\| -f5 | wc -m); printf "%s| %-$((nc-2))s|%s\n" "$h" "$(date +%Y/%m/%d)" "$t"); done < README.md > new mv new README.md fi diff --git a/scripts/19-igcp.sh b/scripts/19-igcp.sh index 0cef073..3c7c032 100755 --- a/scripts/19-igcp.sh +++ b/scripts/19-igcp.sh @@ -10,7 +10,7 @@ else while IFS='' read -r line || [[ -n "$line" ]]; do test $(echo "$line"|grep -v igcp|wc -l) -eq "1" \ && echo "$line" \ - || (h=$(echo "$line"|cut -d\| -f1-4); t=$(echo "$line"|cut -d\| -f6-); echo "$h| $(date +%Y/%m/%d) |$t"); + || (h=$(echo "$line"|cut -d\| -f1-4); t=$(echo "$line"|cut -d\| -f6-); nc=$(echo "$line"|cut -d\| -f5 | wc -m); printf "%s| %-$((nc-2))s|%s\n" "$h" "$(date +%Y/%m/%d)" "$t"); done < README.md > new mv new README.md fi diff --git a/scripts/20-viva.sh b/scripts/20-viva.sh index 71cf954..8a01e82 100755 --- a/scripts/20-viva.sh +++ b/scripts/20-viva.sh @@ -15,7 +15,7 @@ else while IFS='' read -r line || [[ -n "$line" ]]; do test $(echo "$line"|grep -v viva|wc -l) -eq "1" \ && echo "$line" \ - || (h=$(echo "$line"|cut -d\| -f1-4); t=$(echo "$line"|cut -d\| -f6-); echo "$h| $(date +%Y/%m/%d) |$t"); + || (h=$(echo "$line"|cut -d\| -f1-4); t=$(echo "$line"|cut -d\| -f6-); nc=$(echo "$line"|cut -d\| -f5 | wc -m); printf "%s| %-$((nc-2))s|%s\n" "$h" "$(date +%Y/%m/%d)" "$t"); done < README.md > new mv new README.md fi diff --git a/scripts/25-eleicoes.sh b/scripts/25-eleicoes.sh index 6f99058..fe7f5d5 100755 --- a/scripts/25-eleicoes.sh +++ b/scripts/25-eleicoes.sh @@ -19,7 +19,7 @@ if [ "$maybeOK" -eq "0" ]; then while IFS='' read -r line || [[ -n "$line" ]]; do test $(echo "$line"|grep -v eleicoes|wc -l) -eq "1" \ && echo "$line" \ - || (h=$(echo "$line"|cut -d\| -f1-4); t=$(echo "$line"|cut -d\| -f6-); echo "$h| $(date +%Y/%m/%d) |$t"); + || (h=$(echo "$line"|cut -d\| -f1-4); t=$(echo "$line"|cut -d\| -f6-); nc=$(echo "$line"|cut -d\| -f5 | wc -m); printf "%s| %-$((nc-2))s|%s\n" "$h" "$(date +%Y/%m/%d)" "$t"); done < README.md > new mv new README.md fi diff --git a/scripts/26-snirh.sh b/scripts/26-snirh.sh index 7f7d05e..c81ed1e 100755 --- a/scripts/26-snirh.sh +++ b/scripts/26-snirh.sh @@ -23,7 +23,7 @@ if [ "$maybeOK" -eq "0" ]; then while IFS='' read -r line || [[ -n "$line" ]]; do test $(echo "$line"|grep -v snirh|wc -l) -eq "1" \ && echo "$line" \ - || (h=$(echo "$line"|cut -d\| -f1-4); t=$(echo "$line"|cut -d\| -f6-); echo "$h| $(date +%Y/%m/%d) |$t"); + || (h=$(echo "$line"|cut -d\| -f1-4); t=$(echo "$line"|cut -d\| -f6-); nc=$(echo "$line"|cut -d\| -f5 | wc -m); printf "%s| %-$((nc-2))s|%s\n" "$h" "$(date +%Y/%m/%d)" "$t"); done < README.md > new mv new README.md fi diff --git a/scripts/29-inpi.sh b/scripts/29-inpi.sh index 7e6f570..ec94fd7 100755 --- a/scripts/29-inpi.sh +++ b/scripts/29-inpi.sh @@ -14,7 +14,7 @@ else while IFS='' read -r line || [[ -n "$line" ]]; do test $(echo "$line"|grep -v inpi|wc -l) -eq "1" \ && echo "$line" \ - || (h=$(echo "$line"|cut -d\| -f1-4); t=$(echo "$line"|cut -d\| -f6-); echo "$h| $(date +%Y/%m/%d) |$t"); + || (h=$(echo "$line"|cut -d\| -f1-4); t=$(echo "$line"|cut -d\| -f6-); nc=$(echo "$line"|cut -d\| -f5 | wc -m); printf "%s| %-$((nc-2))s|%s\n" "$h" "$(date +%Y/%m/%d)" "$t"); done < README.md > new mv new README.md fi diff --git a/scripts/35-turismo.sh b/scripts/35-turismo.sh index d2e9c50..7ff7066 100755 --- a/scripts/35-turismo.sh +++ b/scripts/35-turismo.sh @@ -8,7 +8,7 @@ else while IFS='' read -r line || [[ -n "$line" ]]; do test "$(echo "$line"|grep -v -c "business")" -eq "1" \ && echo "$line" \ - || (h=$(echo "$line"|cut -d\| -f1-4); t=$(echo "$line"|cut -d\| -f6-); echo "$h| $(date +%Y/%m/%d) |$t"); + || (h=$(echo "$line"|cut -d\| -f1-4); t=$(echo "$line"|cut -d\| -f6-); nc=$(echo "$line"|cut -d\| -f5 | wc -m); printf "%s| %-$((nc-2))s|%s\n" "$h" "$(date +%Y/%m/%d)" "$t"); done < README.md > new mv new README.md fi diff --git a/scripts/36-norte2020.sh b/scripts/36-norte2020.sh index d950f9f..a33be97 100755 --- a/scripts/36-norte2020.sh +++ b/scripts/36-norte2020.sh @@ -14,7 +14,7 @@ else while IFS='' read -r line || [[ -n "$line" ]]; do test "$(echo "$line"|grep -v -c "norte2020")" -eq "1" \ && echo "$line" \ - || (h=$(echo "$line"|cut -d\| -f1-4); t=$(echo "$line"|cut -d\| -f6-); echo "$h| $(date +%Y/%m/%d) |$t"); + || (h=$(echo "$line"|cut -d\| -f1-4); t=$(echo "$line"|cut -d\| -f6-); nc=$(echo "$line"|cut -d\| -f5 | wc -m); printf "%s| %-$((nc-2))s|%s\n" "$h" "$(date +%Y/%m/%d)" "$t"); done < README.md > new mv new README.md fi diff --git a/scripts/40-sef.sh b/scripts/40-sef.sh index 42ae7d7..3172219 100755 --- a/scripts/40-sef.sh +++ b/scripts/40-sef.sh @@ -10,7 +10,7 @@ else while IFS='' read -r line || [[ -n "$line" ]]; do test "$(echo "$line"|grep -v -c "sef.pt")" -eq "1" \ && echo "$line" \ - || (h=$(echo "$line"|cut -d\| -f1-4); t=$(echo "$line"|cut -d\| -f6-); echo "$h| $(date +%Y/%m/%d) |$t"); + || (h=$(echo "$line"|cut -d\| -f1-4); t=$(echo "$line"|cut -d\| -f6-); nc=$(echo "$line"|cut -d\| -f5 | wc -m); printf "%s| %-$((nc-2))s|%s\n" "$h" "$(date +%Y/%m/%d)" "$t"); done < README.md > new mv new README.md fi diff --git a/scripts/48-insa.sh b/scripts/48-insa.sh index 4f27d2d..b3daf0d 100755 --- a/scripts/48-insa.sh +++ b/scripts/48-insa.sh @@ -10,7 +10,7 @@ else while IFS='' read -r line || [[ -n "$line" ]]; do test "$(echo "$line"|grep -v -c "insa")" -eq "1" \ && echo "$line" \ - || (h=$(echo "$line"|cut -d\| -f1-4); t=$(echo "$line"|cut -d\| -f6-); echo "$h| $(date +%Y/%m/%d) |$t"); + || (h=$(echo "$line"|cut -d\| -f1-4); t=$(echo "$line"|cut -d\| -f6-); nc=$(echo "$line"|cut -d\| -f5 | wc -m); printf "%s| %-$((nc-2))s|%s\n" "$h" "$(date +%Y/%m/%d)" "$t"); done < README.md > new mv new README.md fi diff --git a/scripts/50-bud.sh b/scripts/50-bud.sh index 00511e9..887516e 100755 --- a/scripts/50-bud.sh +++ b/scripts/50-bud.sh @@ -14,7 +14,7 @@ else while IFS='' read -r line || [[ -n "$line" ]]; do test $(echo "$line"|grep -v bud|wc -l) -eq "1" \ && echo "$line" \ - || (h=$(echo "$line"|cut -d\| -f1-4); t=$(echo "$line"|cut -d\| -f6-); echo "$h| $(date +%Y/%m/%d) |$t"); + || (h=$(echo "$line"|cut -d\| -f1-4); t=$(echo "$line"|cut -d\| -f6-); nc=$(echo "$line"|cut -d\| -f5 | wc -m); printf "%s| %-$((nc-2))s|%s\n" "$h" "$(date +%Y/%m/%d)" "$t"); done < README.md > new mv new README.md fi diff --git a/scripts/51-dgeg.sh b/scripts/51-dgeg.sh index 4101749..85dc3e2 100755 --- a/scripts/51-dgeg.sh +++ b/scripts/51-dgeg.sh @@ -10,7 +10,7 @@ else while IFS='' read -r line || [[ -n "$line" ]]; do test "$(echo "$line"|grep -v -c "dgeg")" -eq "1" \ && echo "$line" \ - || (h=$(echo "$line"|cut -d\| -f1-4); t=$(echo "$line"|cut -d\| -f6-); echo "$h| $(date +%Y/%m/%d) |$t"); + || (h=$(echo "$line"|cut -d\| -f1-4); t=$(echo "$line"|cut -d\| -f6-); nc=$(echo "$line"|cut -d\| -f5 | wc -m); printf "%s| %-$((nc-2))s|%s\n" "$h" "$(date +%Y/%m/%d)" "$t"); done < README.md > new mv new README.md fi diff --git a/scripts/52-covid.sh b/scripts/52-covid.sh index 6e8b77c..bde0e3b 100755 --- a/scripts/52-covid.sh +++ b/scripts/52-covid.sh @@ -17,7 +17,7 @@ else while IFS='' read -r line || [[ -n "$line" ]]; do test "$(echo "$line"|grep -v -c "covid19")" -eq "1" \ && echo "$line" \ - || (h=$(echo "$line"|cut -d\| -f1-4); t=$(echo "$line"|cut -d\| -f6-); echo "$h| $(date +%Y/%m/%d) |$t"); + || (h=$(echo "$line"|cut -d\| -f1-4); t=$(echo "$line"|cut -d\| -f6-); nc=$(echo "$line"|cut -d\| -f5 | wc -m); printf "%s| %-$((nc-2))s|%s\n" "$h" "$(date +%Y/%m/%d)" "$t"); done < README.md > new mv new README.md fi