Greetings,
I'm trying to populate an EA by reading a string of text from the hidden .identity file (located in /Library/Application Support/CrashPlan) that is created when CrashPlan is installed and configured for a user. From what I can see, the user account that is configured is in the last line of the file. I need to get some of that string in an EA. The string looks something like this: "username=johnsmith@domain.edu". I only need the "johnsmith" part of the text. I believe this can be done using the cat, grep, or sed command(s) but I am not sure where to start. Any help would be much appreciated.
Solved
Populate an EA from a string of text from a file

Best answer by Jerneheim
Hi Joe,
This might be a start.
VAR=$(cat /Library/Application Support/CrashPlan/.Identity |grep username= |sed -e 's/.*=(.*)@.*/1/'); echo "<result>$VAR</result>"
Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.