Last active
June 10, 2022 18:23
-
-
Save craigbruenderman/a83b70c9041651bf9338aa62c99d914e to your computer and use it in GitHub Desktop.
This file contains hidden or 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/bash | |
HOST=cpmasesx01.na.domain.com | |
PASSWD= | |
for m in $(cat list.txt) | |
do | |
MACHINE_PATH=`sshpass -p $PASSWD ssh root@$HOST find /vmfs/volumes/ -name $m -print` | |
if [ -z "$MACHINE_PATH" ] | |
then | |
echo "$m not on host" | |
else | |
echo "Cloning $MACHINE_PATH" | |
sshpass -p $PASSWD scp -r root@$HOST:$MACHINE_PATH/ /Volumes/Untitled | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment