Phonebook options
| Command Line Options |
|---|
gnokii --getphonebook memory_type start_number [end_number|end]
[ [-r|--raw]|[-v|--vcard]|[-l|--ldif] ]
gnokii --writephonebook [ [-o|--overwrite]|[-f|--find-free] ]
[-m|--memory-type|--memory] [-n|--memory-location|--location]
[ [-v|--vcard]|[-l|--ldif] ]
gnokii --deletephonebook memory_type start_number [end_number|end]
memory_type is a memory type code of two or three letters.
The most common ones are ME (internal memory) and SM (SIM card).
Internal memory is probably what you want to use for your contacts.
--getphonebook writes entries to stdout, and --writephonebook reads entries from stdin.
By default --getphonebook writes entries in a human readable format. With --raw or --vcard or --ldif it gives
data that can serve as input to --writephonebook or to third party programs.
--writephonebook
When the -o or --overwrite option is used, existing entries at a given location are overwritten (this isn't supported by all phones).
When the -f or --find-free option is given, gnokii tries to find a free location. In this case, you can omit the location field in the input data.
When the -m or --memory-type or --memory option is given, gnokii writes the contact to that memory type (usually only SM and/or ME are valid choices).
When the -n or --memory- or --location option is given, gnokii tries to write the contact to that location if none is given in the input data (some phones always ignore this parameter and save to the first empty location or update an existing entry that matches name or number).
When the -v or --vcard option is given sets input must be in vCard format (default is raw format).
When the -l or --ldif option is given sets input must be in ldif format.
Example:
echo "test;123;SM;200;5" | gnokii --writephonebook
This writes a contact with name "test" and number "123" in SIM memory at location "200" (note that some phones do not allow writing at arbitrary locations).