Error out when giving an empty delimiter to sort(1)
This commit is contained in:
parent
3debc5e064
commit
5ad71a466b
2
sort.c
2
sort.c
@ -364,6 +364,8 @@ main(int argc, char *argv[])
|
|||||||
break;
|
break;
|
||||||
case 't':
|
case 't':
|
||||||
fieldsep = EARGF(usage());
|
fieldsep = EARGF(usage());
|
||||||
|
if (!*fieldsep)
|
||||||
|
eprintf("empty delimiter\n");
|
||||||
fieldseplen = unescape(fieldsep);
|
fieldseplen = unescape(fieldsep);
|
||||||
break;
|
break;
|
||||||
case 'u':
|
case 'u':
|
||||||
|
Loading…
Reference in New Issue
Block a user