Last active
January 7, 2020 15:46
-
-
Save kdrwygvh/9c9c64cae7ee6de6f1218d8fa539cdd3 to your computer and use it in GitHub Desktop.
User Log in Date
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
currentUser=$( echo "show State:/Users/ConsoleUser" | scutil | awk '/Name :/ && ! /loginwindow/ { print $3 }' ) | |
echo "<result>$(w -h "$currentUser" | head -1 | awk '{print $4}')</result>" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment