LOOP THROUGH (REVERSE LIST)

This commit is contained in:
fred 2022-04-07 16:58:11 +02:00
parent b35a0bdc1a
commit 8d6a7474be
1 changed files with 3 additions and 2 deletions

View File

@ -30,8 +30,9 @@ echo "IPFS GATEWAY $IPFSNGW"
VWALLURL="https://api.crowdbunker.com/post/all"
curl -s $VWALLURL -H "Accept: application/json" > ~/.zen/bunkerbox/crowd.json
## LOOP THROUGH
for VUID in $(cat ~/.zen/bunkerbox/crowd.json | jq -r '.posts | .[] | .video.id'); do
## LOOP THROUGH (REVERSE LIST)
cat ~/.zen/bunkerbox/crowd.json | jq -r '.posts | .[] | .video.id' > /tmp/vuid.list
for VUID in $(tac /tmp/vuid.list); do
[[ "$VUID" == "null" ]] && echo "MESSAGE... Bypassing..." && echo && continue
echo "Bunker BOX : Adding $VUID"
mkdir -p ~/.zen/bunkerbox/$VUID/media