Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save floweb/2d0b6ce493dd7410cc3988be9ed2e45e to your computer and use it in GitHub Desktop.
Save floweb/2d0b6ce493dd7410cc3988be9ed2e45e to your computer and use it in GitHub Desktop.
change_keycloak_export_realm_json_uuid.sh
#!/bin/bash
grep "^ *\"id.*[0-9A-Fa-f]-" NewRealm-realm.json | cut -d'"' -f4 > myuuidfile
while read;
do
uuid=$(cat /proc/sys/kernel/random/uuid);
sed -i "s/$REPLY/$uuid/g" NewRealm-realm.json
done < myuuidfile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment