Skip to content

Instantly share code, notes, and snippets.

@adamjakab
Created March 19, 2015 12:02
Show Gist options
  • Save adamjakab/0c23da818a8ad3ca1d4f to your computer and use it in GitHub Desktop.
Save adamjakab/0c23da818a8ad3ca1d4f to your computer and use it in GitHub Desktop.
converting Outlook pst to Thunderbird(Author: Srijan Kishore - https://www.howtoforge.com/convert_outlook_pst_files_to_thunderbird_and_evolution_on_linux)
#!/bin/bash
mkdir ~/outlook
#File selection
readpst -o ~/outlook -r `zenity --file-selection`
find ~/outlook -type d | tac | grep -v '^~/outlook$' | xargs -d '\n' -I{} mv {} {}.sbd
find ~/outlook.sbd -name mbox -type f | xargs -d '\n' -I{} echo '"{}" "{}"' | sed -e 's/\.sbd\/mbox"$/"/' | xargs -L 1 mv
#Script Completion
find ~/outlook.sbd -empty -type d | xargs -d '\n' rmdir
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment