Refactor cut.1 and cut.c
and reflect recent changes to the role of "delim".
This commit is contained in:
parent
eb57becb38
commit
c369844ae2
4
cut.1
4
cut.1
|
@ -53,9 +53,9 @@ delimiters are passed through, unless
|
|||
.Fl s
|
||||
is specified.
|
||||
.It Fl d Ar delim
|
||||
Use first byte of
|
||||
Use
|
||||
.Ar delim
|
||||
as field delimiter. Default is \et.
|
||||
as field delimiter, which can be an arbitrary string. Default is '\et'.
|
||||
.It Fl s
|
||||
Suppress lines not containing field delimiters.
|
||||
.El
|
||||
|
|
7
cut.c
7
cut.c
|
@ -158,8 +158,11 @@ resolveescapes(char *s, size_t len)
|
|||
case 'r': s[i] = '\r'; off++; break;
|
||||
case 't': s[i] = '\t'; off++; break;
|
||||
case 'v': s[i] = '\v'; off++; break;
|
||||
case '\0': eprintf("cut: null escape sequence in delimiter\n");
|
||||
default: eprintf("cut: invalid escape sequence '\\%c' in delimiter\n", s[i + 1]);
|
||||
case '\0':
|
||||
eprintf("cut: null escape sequence in delimiter\n");
|
||||
default:
|
||||
eprintf("cut: invalid escape sequence '\\%c' in"
|
||||
"delimiter\n", s[i + 1]);
|
||||
}
|
||||
|
||||
for (m = i + 1; m <= len - off; m++)
|
||||
|
|
Loading…
Reference in New Issue
Block a user