#! /bin/bash
pdf_one="$1"
pdf_two="$2"
text_one=$(mktemp)
text_two=$(mktemp)
pdftotext "$pdf_one" "$text_one"
pdftotext "$pdf_two" "$text_two"
diff "$text_one" "$text_two" #! /bin/bash
pdf_one="$1"
pdf_two="$2"
text_one=$(mktemp)
text_two=$(mktemp)
pdftotext "$pdf_one" "$text_one"
pdftotext "$pdf_two" "$text_two"
diff "$text_one" "$text_two"Links for those who are similarly curious, with the 2nd link being especially fascinating:
https://unix.stackexchange.com/questions/276751/is-space-all...
https://web.archive.org/web/20170215070707/http://www.in-ulm... (courtesy of one of the answers in the first link but separately interesting IMHO)
I will say, I don't know if it's Stockholm Syndrome from years of writing them with the space or what, but I do find the space version nicer to read, doubly so when using the [almost obligatory on macOS] `/usr/bin/env bash` form since it makes all the participants in the shebang space delimited.
I can easily see the counterargument from those misguided souls who hard-code `/bin/bash` that the non space version is their muscle memory and requires less mental parsing