summaryrefslogtreecommitdiff
path: root/src/seq.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1999-04-26 00:39:47 +0000
committerJim Meyering <jim@meyering.net>1999-04-26 00:39:47 +0000
commitbf73dd529725dbfdf95c768792b77f87b190cd14 (patch)
tree77aebbf4beafccc1b4d57da986d0a8d91b6ae2e3 /src/seq.c
parent6002b5a2ed68cdc7463bf65df4652f2d3bf91578 (diff)
downloadcoreutils-bf73dd529725dbfdf95c768792b77f87b190cd14.tar.xz
(main): Handle the case in which seq is given no args.
Diffstat (limited to 'src/seq.c')
-rw-r--r--src/seq.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/seq.c b/src/seq.c
index 27ebc9df0..af2be47c6 100644
--- a/src/seq.c
+++ b/src/seq.c
@@ -140,6 +140,12 @@ main (int argc, char **argv)
}
#endif
+ if (argc == 1)
+ {
+ error (0, 0, _("too few arguments"));
+ usage (1);
+ }
+
/* We have to handle negative numbers in the command line but this
conflicts with the command line arguments. So explicitly check first
whether the next argument looks like a negative number. */