Skip to content

Instantly share code, notes, and snippets.

@zhaorui
Created December 2, 2013 15:35
Show Gist options
  • Save zhaorui/7751242 to your computer and use it in GitHub Desktop.
Save zhaorui/7751242 to your computer and use it in GitHub Desktop.
Weird...
#!/bin/bash
PRIMARYGROUP="Domain Users"
gen_apple_id()
{
set -x
local NAME=$1
local TYPE=$2
echo name: $NAME
echo type: $TYPE
local UUID=`adquery $TYPE "$NAME" --attribute _ObjectExtended`
if [ -z "$UUID" ];then
echo "UUID is empty"
return
fi
echo "UUID: $UUID"
set +x
}
gen_apple_id "$PRIMARYGROUP" "group"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment