Created
December 2, 2019 10:48
-
-
Save elpollodiablo/fd1599f43f30206ca77012639430a901 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# podmanager | |
# URLBASE="https://admin:[email protected]:8443" | |
URLBASE="https://root:[email protected]" | |
URLS="$URLBASE/redfish/v1" | |
while true; | |
do | |
NEWURLS="" | |
for URL in $URLS; | |
do | |
echo $URL | |
WITHOUT=`echo $URL|sed s,$URLBASE/,,g` | |
DIR="$WITHOUT" | |
FILE="$WITHOUT/xml" | |
mkdir -p "$DIR" | |
# mkdir -p | |
if [ -f "$FILE" ]; then | |
echo not doing $URL | |
else | |
MYURLS=`wget $URL --quiet --no-check-certificate -O - |tee "$FILE" |sed "s,\",\n,g"|grep "/redfish/v1" | sed "s,/redfish/v1,$URLBASE/redfish/v1,"`; | |
NEWURLS="$NEWURLS $MYURLS"; | |
fi; | |
done | |
URLS="$NEWURLS" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment