logo

utils-std

Collection of commonly available Unix tools
commit: 23493c5479e85faca44120b963475588a44a6991
parent 7c1fea1925ff2dfe5e7e51584984f2d31896fd83
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Thu, 14 Mar 2024 20:35:09 +0100

cmd/seq: handle missing option operand

Diffstat:

Mcmd/seq.c4++++
1 file changed, 4 insertions(+), 0 deletions(-)

diff --git a/cmd/seq.c b/cmd/seq.c @@ -91,6 +91,10 @@ main(int argc, char *argv[]) case 's': sep = optarg; break; + case ':': + fprintf(stderr, "seq: Option -%c requires an operand\n", optopt); + usage(); + return 1; case '?': if(isdigit(optopt)) {