How would I use dscl
in Objective-C and obtain its output? The command I want to pass as if it is in Terminal is:
dscl . -readall /Users UniqueID | awk '/^RecordName:/ {name=$2}; /^UniqueID: / {if ($2 > 500) print name}'
I know how to launch system_profiler with arguments such as -xml, etc. but I can't figure out how to pass such a long string in where is actually works.
I know system_profiler is /usr/sbin/system_profiler, but what about dscl?