Rispondi al commento

Mobile phone addressbook backup

Versione stampabileVersione stampabile
mobilephone-pda

This is a small bashscript i wrote to backup my mobile phone addressbook into LDIF format to import in LDAP. It uses gnokii to dump the phone/sim addressbooks.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/bash
 
OUTFILE="./addressbook_$(date +"%Y%m%d-%H%M%S").ldif"
ERRLOG="/tmp/gnokii-backup-errlog-$(pwgen 10 1).log"
 
echo > "$OUTFILE"
 
echo -n "Backupping SIM memory ... "
gnokii --getphonebook SM 1 end -l  >> "$OUTFILE" 2> "$ERRLOG" && echo "[ DONE ]" || echo "[FAILED]"
cat "$ERRLOG" | sed "s/^/  /g"
rm "$ERRLOG"
 
echo -n "Backupping PHONE memory ... "
gnokii --getphonebook ME 1 end -l  >> "$OUTFILE" 2> "$ERRLOG" && echo "[ DONE ]" || echo "[FAILED]"
cat "$ERRLOG" | sed "s/^/  /g"
rm "$ERRLOG"
 
bzip2 "$OUTFILE"
 
echo "Done. Saved to: ${OUTFILE}.bz2"
<code language=bash>

Rispondi

  • Indirizzi web o e-mail vengono trasformati in link automaticamente
  • Elementi HTML permessi: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Linee e paragrafi vanno a capo automaticamente.
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>. The supported tag styles are: <foo>, [foo].
  • Image links with 'rel="lightbox"' in the <a> tag will appear in a Lightbox when clicked on.
  • Links to HTML content with 'rel="lightframe"' in the <a> tag will appear in a Lightbox when clicked on.

Maggiori informazioni sulle opzioni di formattazione.

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Enter the characters shown in the image.

Who Am I?

~redShadow~ A.K.A. Samuele Santi is an Italian Open Source developer, currently working as a freelance developer, mainly in the web applications sector. Favourite programming languages: PHP and, of course, Python!

blogroll (7) development (11) cars (1) Drupal (21) backup (3) dmcrypt (1) contact manager (1) alcool (1) C++ (2) audio (1) archive (1) circuits (1) database (3) documentation (2) aoe (1) apt (1) 3d (3) debian (1) bash (11) arduino (1) aircrack (1) e-mail (2) awstats (3) blender (3) citroen (1) 2v (1) doku (1) algorythms (1) code (3) camera mia (1) Drupal Forms (1) cocktails (1) apache (1) debug (1) cryptography (1) cartoons (1) address book (2) caos (1) como lake rovers (1) curl (1)