Hi
I am trying to write an applescript that will populate some details from AD using dsl. I am stuck at the moment trying to work out how to get a value which has a carriage return
I currently have:
set loggedInUser to do shell script "whoami"
do shell script "dscl . -read /Users/" & loggedInUser
Which shows the bit i am interested in below:
JobTitle:
Systems Engineer
I have tried the following but it just returns “JobTitle:”
set JobTitle to do shell script "dscl . -read /Users/" & loggedInUser & " | grep JobTitle: "
Please can someone tell me if it is possible to output the job title correctly as it seem difficult to grep also the carriage return and the space