Error out when giving an empty delimiter to sort(1)

This commit is contained in:
FRIGN 2016-03-07 11:18:30 +01:00 committed by sin
parent 3debc5e064
commit 5ad71a466b
1 changed files with 2 additions and 0 deletions

2
sort.c
View File

@ -364,6 +364,8 @@ main(int argc, char *argv[])
break;
case 't':
fieldsep = EARGF(usage());
if (!*fieldsep)
eprintf("empty delimiter\n");
fieldseplen = unescape(fieldsep);
break;
case 'u':