Get the number of Configuration Profiles installed in Mac OS from the command line


#!/bin/sh
RESULT1=`/usr/bin/profiles -L | tail -n 1 | cut -d':' -f2`
RESULT=`grep -o "[0-9]" <<< "$RESULT1"`

echo "<result>$RESULT</result>"

exit 0
© 2011 Adam Gerson.