I would like to do it repeatedly. My use case is this. When you drag an ICS file on to Tnderbox, Tinderbox copies the $Name, $StartDate, $EndDate. It ignores everything else.
What I’ve been doing is hand-copying the names and emails of all the invitees for all my meetings. What I figured out is that I can use
$Attended=runCommand("grep -o '[[:alnum:]+\.\_\-]*@[[:alnum:]+\.\_\-]*'",$Text);
to copy the email address after paying them from the Calendar to the meeting. I can then use Roger’s code to build the list. My complete script looks like this (last names and domain blurred out), I’m to complete the operation on all one attribute in a Stamp.
$Attended=runCommand("grep -o '[[:alnum:]+\.\_\-]*@[[:alnum:]+\.\_\-]*'",$Text);$MyCommand="awk 'FNR==1 " + "{printf(" + '"%s",' + "$1);next}" + "{printf(" + '";%s",' + "$1)}'";$Attended=runCommand($MyCommand,$Attended);
I tried Mark’s method. It worked great when the emails were in $Text, but did not work when they were in a field, like with Roger’s script.
There are a couple of things I can’t figure it. I’m not sure why Roger’s code needs the MyCommand attribute. In an attempt to skip this step I tried putting the command in the Stamp and got an error.
/bin/sh: line 1: unexpected EOF while looking for matching `‘’
/bin/sh: line 7: syntax error: unexpected end of file
Also, I’d love to part the first names. In Expressions, this RegEx .*(?=<)
seems to pull the right info, but when applying within the Stamp, does not seem to work.
Thanks for the effort. This will save a lot of time.