@archer72 I kinda like date --iso-8601, which will output '2024-03-31' for today (but of course without the same precision you used).
I find this format much easier to read and it's automatically sorted correctly when you look at a lot of files. 🙂
If I need to be more precise, I usually go with date +%Y-%m-%d-%H%M%S.
Okay, so. I have a #PDF and a #DOCX file. And I’d like to compare them. And since I’m a programmer, I don’t want to compare them visually, but with a #diff. But how?
Like this.
alias pdfcat='gs -q -sDEVICE=txtwrite -o-'
alias doccat='pandoc -t plain'
pdfcat a.pdf > a.txt
doccat b.docx > b.txt
git diff --no-index --word-diff a.txt b.txt
And since we’re using --word-diff, it doesn’t matter that the two files use wildly different line wrapping.