F
fresh$free
Mitglied
Wir sind ja hier im Shellscriptforum also noch als bash-version:
Code:
#!/bin/bash
while read line
do
s1=`echo $line | cut -d "," -f 1 -`;
s2=`echo $line | cut -d "," -f 2 -`;
s3=`echo $line | cut -d "," -f 3 -`;
s1=${s1%?};
s2=${s2%?};
s3=${s3//\"/};
fout_name=`echo $s3|cut -b -7 -`;
echo "BEGIN:VCARD
VERSION:3.0
CATEGORIES:VIP
X-VIPCategory:Misc
ADR;ENCODING=QUOTED-PRINTABLE:;;$s3
X-NAVADDR:;;;;;;;;;
GEO:$s2;$s1
X-Flag:
REV:20140820T191503z
FN;ENCODING=QUOTED-PRINTABLE:$s3
UID:AddresBookPersistentProvider3
END:VCARD" > $fout_name;
done < testdatei