I feel like this article is more of “here’s how to convert vCard to something human-readable for backup purposes”, not “contact management”. To me, contact management implies contact synchronization across platforms, not just centralized import.
Sorry to disappoint, it does job for me :)
It appears that you’re the author of the post – make sure to check the “I am the author of the story at this URL (or this text)” checkbox while posting. :)
Sorry, will try to remember next time.
I believe it’s possible to ignore whitespace with diff, so that you wouldn’t need to hardcode the width.
So I wanted to try this out to test, and (like most things on the internet), the results are mixed.
Suppose you have two files:
If we were to diff -u these two files after a column -t, we would get:
However, if we switch to using diff -bu, then we successfully get:
However, this is assuming that we don’t have that fancy line of equals at the top. If we dynamically generate that based on column name (an exercise I leave to the reader), even with diff -bu, we still get some false positives:
tl;dr, if you want those fancy equals headers, you gotta hard code them.
Thank you for that, I forgot about the -b flag :)
Personally I wouldn’t put the equals line in the file, but if you must, you could instead just strip it out for diffing; e.g.,
diff -bu \
<(awk 'NR > 2' before.txt) \
<(awk 'NR > 2' after.txt)