Results 1 to 3 of 3
Thread: Bash
Hybrid View
-
10th July 2011 17:35 #1Registered User
Join Date: Oct:2008
Location:
Posts: 95
Bash
,
. , , , vCard . FMA , , - BlueTooth. .
:
, 2 , . ,Code:BEGIN:VCARD VERSION:2.1 N;CHARSET=UTF-8:familia1;ime1 TEL;WORK:031752231 X-IRMC-LUID:00020000000F END:VCARD BEGIN:VCARD VERSION:2.1 N;CHARSET=UTF-8:familia2;ime2 TEL;WORK:032665672 TEL;CELL:0899832155 X-IRMC-LUID:000200000052 END:VCARD
familia1-ime1.vcf
familia2-ime2.vcfCode:BEGIN:VCARD VERSION:2.1 N;CHARSET=UTF-8:familia1;ime1 TEL;WORK:031752231 X-IRMC-LUID:00020000000F END:VCARD
, 2- . , :Code:BEGIN:VCARD VERSION:2.1 N;CHARSET=UTF-8:familia2;ime2 TEL;WORK:032665672 TEL;CELL:0899832155 X-IRMC-LUID:000200000052 END:VCARD
(BEGIN:VCARD)(.*)CHARSET=UTF-8
.*);(.*)$(.*)(END:VCARD)
.
!
!
-
18th July 2011 22:09 #2Registered User
Join Date: Aug:2006
Location: Bulgaria/Sofia
Posts: 5
, , big.file.vcard, vcard.1,2,3,4... :
#!/bin/bash
declare -i VCARD
cat big.file.vcard | while read line
do
if [ "$line" = "BEGIN:VCARD" ]; then
VCARD=$VCARD+1;
fi
echo "$line" >> vcard.$VCARD;
done
-
25th July 2012 20:31 #3Registered User
Join Date: Oct:2008
Location:
Posts: 95
awk. , .
:Code:BEGIN { RS = "BEGIN:VCARD"; FS="END:VCARD"} { c += 1; print "BEGIN:VCARD"$1"END:VCARD" > c".vcf"; }
awk -f split_contacts.awk full-contact-list.txt
1.vcf , , .




Reply With Quote
Lenovo ThinkPad 15 IdeaPad 15
5th May 2023, 22:16 in