grep -T
funcionará 7 / 8ths do tempo.
% for f in a ab abc abcd abcde abcdef abcdefg abcdefgh; do echo pattern > $f; done
% grep -T pattern *
a :pattern
ab :pattern
abc :pattern
abcd :pattern
abcde :pattern
abcdef :pattern
abcdefg:pattern
abcdefgh :pattern
No manual do GNU grep :
-T
--initial-tab
Make sure that the first character of actual line content lies on a tab stop, so that the alignment of tabs looks normal. This is useful with options that prefix their output to the actual content:
-H
,-n
, and-b
. In order to improve the probability that lines from a single file will all start at the same column, this also causes the line number and byte offset (if present) to be printed in a minimum-size field width.