osx - Shell command or script to define MobileMe Account Name and copy it to clipboard -


Hello, I am working on small service for OS X, I was wondering how I received the mobile account Can I (if the person is logged in OSX) for more use in script?

Do you want to snippet the following? DSLL Localhost - Radle / Local / Default / User / $ (ID -UN) DSATRTV Penetration: LinkedIn MAC.com | Grep-A1 '& gt; Name & lt; ' | Sed -n's /.* string & gt; \ *. * \) & Lt; \ / String>. The first item reads linked to MacDocs for the request of the user from the Directory Service, the next element gets the name field and the last element is the user. Of Takes the name of Mac and displays it.

To put it in the clipboard, you issue this command, with the following termination:

  DSLL localhost - radle / local / default / user / $ (id -UN) dsAttrTypeNative: LinkedIdentity mac.com | Grep-A1 '& gt; Name & lt; ' | Sed -n's /.* string & gt; \ (. * \) & Lt; \ / String>. * / / 1 / p '| Pbcopy   

which copies the value in the clipboard (which I previously missed in the question)

Comments