Created
November 4, 2018 11:48
-
-
Save dylangerdaly/2f8c14141bb00e4d018695ff62530d06 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/bash | |
for file in $(./ipfs refs local); | |
do | |
if ! [[ $(./ipfs cat "$file" 2>&1 >/dev/null | grep 'Error') ]] ; then | |
if ! [[ $(./ipfs cat "$file" | file - | grep ': data') ]] ; then | |
printf "=== LOCAL FILE FOUND ===\n\n" | |
echo $file | |
./ipfs cat "$file" | file - | |
printf "\n\n" | |
fi | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment