Commit da291c0f authored by aborruso's avatar aborruso

ricavo dell'ultimo e del penultimo file set di file scaricato

parent 29b384f6
......@@ -27,3 +27,8 @@ while [ $contatore -ge 0 ]; do
rm "$cartella"/download/latest_"$nome".csv
cp "$cartella"/download/"$dataoggi"_"$nome".csv "$cartella"/download/latest_"$nome".csv
done
# ricavo dell'ultimo e del penultimo file set di file scaricato
ultimoFile=$(ls -1 | sort -r | grep '20' | head -n 1 | sed -E 's/([0-9]+)(.*)/\1/g')
penultimoFile=$(ls -1 | sort -r | grep '20' | grep -v "$ultimoFile" | head -n 1 | sed -E 's/([0-9]+)(.*)/\1/g')
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment