Skip to content

Instantly share code, notes, and snippets.

@maxsupermanhd
Created June 22, 2023 21:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save maxsupermanhd/e4ff0db8d84ab45c7c39b4989837e5fd to your computer and use it in GitHub Desktop.
Save maxsupermanhd/e4ff0db8d84ab45c7c39b4989837e5fd to your computer and use it in GitHub Desktop.
Script to diff all files from 2 folders and make a changelist
#!/bin/bash
if [ $# -lt 2 ]; then
echo "Usage: $0 <compare from> <compare to>"
exit
fi
CFROM=$1
CTO=$2
FNAME=diff_$1:$2.txt
echo "Comparing $1 (from) to $2 (to)" > $FNAME
for i in `ls $CFROM`; do
echo "################## Changes to: $i (- from + to) ##################" >> $FNAME
~/jd $CFROM/$i $CTO/$i >> $FNAME
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment