To show only added files in a patch: lsdiff -s patch | grep ^+ | \ cut -c2- | xargs -rn1 filterdiff patch -i To show the headers of all file hunks: lsdiff -n patch | (while read n file do sed -ne "$n,$(($n+1))p" patch done) ...
In addition, its ability to use various diff_options such as -u for unified format, -c for context format, -y for side-by-side comparison, and -w for ignoring white space enhances its functionality and allows for more tailored comparisons....