Trying to get the username of the currently logged in user during a Login policy. I have tried all sorts of ways: $3, stat -f%Su /dev/console, and through /dev/console.
I wasn't getting the desired results from the script. I echoed the variable back and checked the policy logs. Every user comes back with <br/> appended to it. I even tried trimming the last 5 characters, but it doesn't remove the break code.
An example of the log:
Script result: Current logged in user: hopeg14<br/>User home: /Users/hopeg14<br/>
I have only started noticing this since the JSS upgrade to 9.100.0
Any thoughts?