I want to get list of all characters, that were used to change files in directory.
The closest I got to this problem was using:
git diff --color-words="[^[:space:]]|([[:alnum:]]|UTF_8_GUARD)+"
--no-index ./original_directory/ ./changed_directory/
By using this command, I get lines with highlighted characters, which were changed. Is there any way to sed/grep/awk the output, so that output will be just the colored characters?
git diff --color | awk '/^\33\[3[12]m/'
Use --color
so that colors are passed to Awk
Green lines will begin with the escape sequence \33[32m
Red lines will begin with the escape sequence \33[31m