Skip to content

Instantly share code, notes, and snippets.

View kdrwygvh's full-sized avatar
🏠
Working from home

John Hutchison kdrwygvh

🏠
Working from home
View GitHub Profile
@kdrwygvh
kdrwygvh / User Log in Date.sh
Last active January 7, 2020 15:46
User Log in Date
#!/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>"
#!/usr/bin/env bash
echo "Enter an API User with Create Category Permissions:"
read apiUser
echo "Enter the Password for this API User:"
read -s apiPassword