Skip to content

Instantly share code, notes, and snippets.

@lytithwyn
Created December 3, 2012 21:36
Show Gist options
  • Save lytithwyn/4198304 to your computer and use it in GitHub Desktop.
Save lytithwyn/4198304 to your computer and use it in GitHub Desktop.
A awk script that will convert a CSV file exported from Outlook Express into one easily consumable by Thunderbird
BEGIN {
FS= ","
}
/$^/ { }
NF {
if(NR == 1) {
a[1] = "First Name"
a[2] = "Last Name"
} else {
split($1, a, " ")
}
print a[1]","a[2]","$1",,"$2",,,"$14","$8",,,,"$3",,"$4","$6","$5","$7","$9",,"$10","$12","$11","$13","$16
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment