Linuxコマンドラインでdirを再帰的に比較し、異なるFile群だけdiffをとってstdoutに出力するだけのShellScript
#!/bin/sh
LANG=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 diff -rq --exclude='.git' dir.old dir.new | while read line; do
if [[ "$line" =~ ^Files\ (.+)\ and\ (.+)\ differ$ ]]; then
echo -e "diff \033[1;33m${BASH_REMATCH[1]}\033[0m \033[1;33m${BASH_REMATCH[2]}\033[0m"
LANG=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 diff "${BASH_REMATCH[1]}" "${BASH_REMATCH[2]}"
fi
done