typedstreamθ„@„„„Action„„NSObject…„i’„„„NSString”„+ Read vCard†’„–—\This is an example how to read vCards (.vcf) dropped from Address Book. The interesting fields are found using sed and awk. vCard files look like: BEGIN:VCARD VERSION:3.0 N:Fischer;Robert;;; FN:Robert Fischer ORG:tin-b Software; EMAIL;type=HOME;type=pref:robert@tinb.de Special cases like double e-mail addresses are not handled by this action!†’„„„NSMutableArray„„NSArray”•’„„„ AtomicProlog„„Atomic”„ic’„–—Check Input Files†’’•„iiii’„–—vcf†’„–—''†’ †’„„„AtomicRunScriptœ’„–—Strip NUL characters†’’„icccc’„–— #!/bin/sh†’„„„NSMutableString–—# Sometimes vcf files contain NUL characters. # The tr command deletes (-d) those characters and # writes the stripped lines into %output tr -d "\0" < "$1"††’„’œ’„–—Run Shell Script†’’Ÿ’€’„¦—ύ# sed -n: suppress echo of lines, only echo matching lines # sed '.....': script # '/^EMAIL/p': Print line starting with 'EMAIL' # awk -F"[;:]": use ; and : as field delimiter # '{print $3}': prints 3rd field # %output: is replaced by file's name, which contains output of # previous command first=`sed -n '/^N:/p' %output | awk -F"[;:]" '{print $3}'` last=`sed -n '/^N:/p' %output | awk -F"[;:]" '{print $2}'` email=`sed -n '/^EMAIL/p' %output | awk -F"[;:]" '{print $4}'` echo $first $last "("$email")" †††’„„„NSMutableDictionary„„ NSDictionary”•’„–—EMail†’„–—robert@tinb.de†††