I'm trying to write a script to automate a task that involves the logged user's username. The problem is the username is coming up as domain/username and I just need the username.
LOGGEDUSER=$(stat -f "%S" /dev/console);
Any way to output the result and remove part of it? This currently outputs domain/username I need to remove the