utility adds extra characters (
, and so on)
to the beginning of lines.
That can cause you real grief with tabstops because the extra characters
adds can shift lines enough to make the indentation look wrong.
option expands TABs to 8-character tabstops and
solves the problem.
If you use
's output through
diff afile bfile | expand -4
doesn't help because
has already added the extra characters.
The best answers I've seen are the
process substitution operator and the
(exclamation point) script . (
You can expand TABs before
For example, to show the differences between two files with 4-column
diff <(expand -4 afile) <(expand -4 bfile)
diff `! expand -4 afile` `! expand -4 bfile`