Get Currently Logged In Username From Active Directory Using Terminal – Mac OS X

#!/bin/bash   # gets login name uname=$( ls -l /dev/console | awk ‘{ print $3 }’ )   # gets first name first=$( dscl . read /Users/$uname RealName | awk ‘{ print $2 }’ )   # gets last name Continue reading Get Currently Logged In Username From Active Directory Using Terminal – Mac OS X