rename .cache so can use in home folder

This commit is contained in:
Shihaam Abdul Rahman 2023-02-28 11:00:19 +05:00
parent b7b0a5c86b
commit 5221780937
Signed by: shihaam
GPG Key ID: 6DA2E87EBC227636

View File

@ -6,9 +6,9 @@ FILENAME=${1}-${2}.json
while [ "$START_NUMBER" -le "$END_NUMBER" ];
do
echo Scraping: $NUMBER # print
CONTENT=$(curl -sihttps://app-production.dhiraagu.com.mv/io/v1/info/subscribers/$NUMBER/dir > .cache) # curl output with http headers and data
DATA=$(cat .cache | tail -n1) # get the json data from last line
HTTP_STATUS=$(cat .cache | head -n1 | awk '{print $2}') # get the http code from first line
CONTENT=$(curl -sihttps://app-production.dhiraagu.com.mv/io/v1/info/subscribers/$NUMBER/dir > .tmpcache) # curl output with http headers and data
DATA=$(cat .tmpcache | tail -n1) # get the json data from last line
HTTP_STATUS=$(cat .tmpcache | head -n1 | awk '{print $2}') # get the http code from first line
if [ "$HTTP_STATUS" = "200" ]
then