Okay. I will say that I came from another forum searching for help, as no one there really knows anything about Mac scripts, but seem to know everything else about FreeBSD, Linux, and of course Windows.
I know many languages including those like C++ and Java, and I know a bit about the Mac syntax and a couple of it's commands, but I am stumbling when it comes to this script as I have never written a shell script for mac.
Can someone please help me and tell me what I am doing wrong?
Any help is appreciated.
I know many languages including those like C++ and Java, and I know a bit about the Mac syntax and a couple of it's commands, but I am stumbling when it comes to this script as I have never written a shell script for mac.
Can someone please help me and tell me what I am doing wrong?
Code:
#!/bin/bash
echo Enter Username:
read user
sudo dscl localhost -read /Search/Users/$user | grep GeneratedUID | cut -c15-
echo Copy above line for GUID:
read guid
sudo cat /var/db/shadow/hash/$guid | cut -c169-216
echo Above is the mac hash...
Any help is appreciated.