How do I import SIM card contacts?
#9
Code:
#!/bin/awk -f
BEGIN{FS=","}
{
gsub(/"/,"",$2)
gsub(/"/,"",$4)
print "BEGIN:VCARD"
print "VERSION:4.0"
print "FN:"$4
print "TEL;TYPE=cell:"$2
print "END:VCARD"
}
save the above as mmcli2vcf.awk, and then run
Code:
mmcli -m any --command='AT+CPBR=1,250' | awk -f mmcli2vcf.awk > contacts.vcf
to get the contacts.vcf, ready for importing
  Reply


Messages In This Thread
RE: How do I import SIM card contacts? - by mruser1 - 06-04-2023, 12:49 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Can't add micro SD card to Pinephone thorensjubilee 7 2,541 02-27-2023, 10:21 AM
Last Post: mikehenson
Question Problem with booting from SD card. Several errors LittleStone 0 843 09-04-2022, 02:34 PM
Last Post: LittleStone
  nextcloud contacts are duplicating Uturn 1 1,853 10-24-2021, 01:35 AM
Last Post: user641
Question Backing up contacts prior to OS reinstall danimations 3 2,520 09-27-2021, 03:35 AM
Last Post: kqlnut
  How to import contacts into the phone book app? nelstomlinson 8 6,897 07-18-2021, 03:26 AM
Last Post: Gary2003
  PinePhone Beta Edition will not boot from MicroSD card Timothy_Ecc 8 7,291 04-30-2021, 03:42 PM
Last Post: Timothy_Ecc
  Contacts not Importing mdshell 1 2,217 03-30-2021, 02:24 AM
Last Post: acrux
  Manually mount SD card in running system? lsitongia 3 3,756 03-03-2021, 11:27 AM
Last Post: lsitongia
Sad Cannot play songs directly from SD card SameExpert 2 3,069 01-25-2021, 04:33 AM
Last Post: SameExpert

Forum Jump:


Users browsing this thread: 1 Guest(s)