Skip to content

Commit

Permalink
Add char-wise diff script
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcellPerger1 committed Oct 29, 2022
1 parent d1c4d14 commit 4e1ec16
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions charwise_diff.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
USAGE="usage: $0 from-file to-file"
for arg; do
if test "$arg" == '--help' || test "$arg" == '-h'; then
echo $USAGE
exit
fi
done
if [ -z "$1" ]; then
echo $USAGE
exit
fi
if [ -z "$2" ]; then
echo $USAGE
exit
fi
git diff --no-index --word-diff=color --word-diff-regex=. $1 $2

0 comments on commit 4e1ec16

Please sign in to comment.