Results 1 to 3 of 3

Thread: Bash

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date: Oct:2008
    Location:
    Posts: 95

    Bash

    ,

    . , , , vCard . FMA , , - BlueTooth. .
    :
    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
    , 2 , . ,
    familia1-ime1.vcf
    Code:
    BEGIN:VCARD
    VERSION:2.1
    N;CHARSET=UTF-8:familia1;ime1
    TEL;WORK:031752231
    X-IRMC-LUID:00020000000F
    END:VCARD
    familia2-ime2.vcf
    Code:
    BEGIN:VCARD
    VERSION:2.1
    N;CHARSET=UTF-8:familia2;ime2
    TEL;WORK:032665672
    TEL;CELL:0899832155
    X-IRMC-LUID:000200000052
    END:VCARD
    , 2- . , :
    (BEGIN:VCARD)(.*)CHARSET=UTF-8.*);(.*)$(.*)(END:VCARD)
    .
    !
    !

  2. #2
    Registered 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

  3. #3
    Registered 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 , , .

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Copyright © 1999-2011 . .
iskamPC.com | mobility.BG | Bloody's Techblog | | 3D Vision Blog |