f78
Line Formats
'
'
'
'
In a line format, ordinary characters represent themselves; conversion
specifications start with '
'
'
'
'
'
'
The default line format is '
If the input contains tab characters and it is important that they line up on
output, you should ensure that '
Taken together, the line and line group formats let you specify many different
formats. For example, the following command uses a format similar to
--old-line-format='-%l
' \
--new-line-format='|%l
' \
--unchanged-line-format=' %l
' \
old new
Formats lines just from the first file.
Formats lines just from the second file.
Formats lines common to both files.
Formats all lines; in effect, it simultaneously sets all three of the previous
options.
Stands for the the contents of the line, not counting its trailing newline (if
any). This format ignores whether the line is incomplete; see Incomplete Lines.
Stands for the the contents of the line, including its trailing newline (if
any). If a line is incomplete, this format preserves its incompleteness.
Stands for '%'.
Stands for C, where C is a single character. C may not be a backslash or an apostrophe. For example, '%c':'' stands for a colon.
dcc
Stands for the character with octal code O where O is a string of 1, 2, or 3 octal digits. For example, '%c'\0'' stands for a null character.
Stands for the line number formatted with F where F is a printf conversion specification. For example, '%.5dn' prints the line number using the printf format, "%.5d". See Line Group Formats for more about printf conversion specifications.
--old-line-format='< %l
' \
--new-line-format='> %l
' \
--old-group-format='%df%(f=l?:,%dl)d%dE
%<' \
--new-group-format='%dea%dF%(F=L?:,%dL)
%>' \
--changed-group-format='%df%(f=l?:,%dl)c%dF%(F=L?:,%dL)
%<---
%>' \
--unchanged-group-format='' \
old new