Skip to content

Get Download statistics

Jean3219 edited this page Mar 29, 2023 · 5 revisions
curl https://api.github.com/repos/Jean28518/linux-assistant/releases | grep download_count > /tmp/down.txt
alles=0
for d in $(grep download_count /tmp/down.txt | cut -d ':' -f2 | cut -d ' ' -f2 | cut -d ',' -f1) 
do 
alles=$[ $alles + $d ] 
done
rm /tmp/down.txt 
echo $alles

Just copy and paste the text into your bash and run it.

Script:

#!/bin/bash

curl https://api.github.com/repos/Jean28518/linux-assistant/releases | grep download_count > /tmp/down.txt

alles=0
for d in $(grep download_count /tmp/down.txt | cut -d ':' -f2 | cut -d ' ' -f2 | cut -d ',' -f1)
do
	alles=$[ $alles + $d ]
done

rm /tmp/down.txt

echo $alles
Clone this wiki locally