Skip to content

Instantly share code, notes, and snippets.

@whonion
Created July 5, 2023 12:54
Show Gist options
  • Save whonion/2423a541f5c3666837324a3a44eceed4 to your computer and use it in GitHub Desktop.
Save whonion/2423a541f5c3666837324a3a44eceed4 to your computer and use it in GitHub Desktop.
#!/bin/bash
# Read each line from addresses.txt file
while IFS= read -r address; do
# Search for the address in genesis.json file
grep -q "$address" genesis.json
# Check the exit status of grep command
if [ $? -eq 0 ]; then
echo "Address '$address' found in genesis.json"
else
echo "Address '$address' not found in genesis.json"
fi
done < addresses.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment