fix resum fitxers
This commit is contained in:
parent
4ae8fe22b6
commit
8a9f82ca56
|
@ -27,16 +27,23 @@ then
|
||||||
) kb"
|
) kb"
|
||||||
echo ""
|
echo ""
|
||||||
sleep 1s
|
sleep 1s
|
||||||
grep -e "--$year" $output | awk '{printf("%s\n", $3)}' >> $sites_output
|
grep -e "--$year" $output | awk '{printf("%s\n", $3)}' | sort | uniq >> $sites_output
|
||||||
sed -i '$ d' $sites_output
|
sed -i '$ d' $sites_output
|
||||||
grep -e "Content-Length" $output | awk '{printf("%.2fKb\n", $2 / 1024)}' >> $mides_output
|
sed -i '1d' $sites_output
|
||||||
echo "## Resum dels fitxers baixats ##"
|
echo "## Resum dels fitxers baixats ##"
|
||||||
sleep 1s
|
sleep 1s
|
||||||
echo "$(paste $sites_output $mides_output | uniq)"
|
while read line; do
|
||||||
|
wget --server-response --no-directories --spider -e robots=off --output-file="$mides_output" "$line"
|
||||||
|
echo "$line $(grep -e "Content-Length" $mides_output | awk '{printf("%.2fKb\n", $2 / 1024)}')"
|
||||||
|
rm $mides_output
|
||||||
|
done < $sites_output
|
||||||
|
#grep -e "Content-Length" $output | awk '{printf("%.2fKb\n", $2 / 1024)}' >> $mides_output
|
||||||
|
# echo "## Resum dels fitxers baixats ##"
|
||||||
|
# sleep 1s
|
||||||
|
#echo "$(paste $sites_output $mides_output | uniq)"
|
||||||
# Delete wget output file
|
# Delete wget output file
|
||||||
rm "$output"
|
rm "$output"
|
||||||
rm "$sites_output"
|
rm "$sites_output"
|
||||||
rm "$mides_output"
|
|
||||||
else
|
else
|
||||||
echo "Unable to calculate estimated size."
|
echo "Unable to calculate estimated size."
|
||||||
exit 1
|
exit 1
|
||||||
|
|
Loading…
Reference in New Issue
Block a user