logo

utils-std

Collection of commonly available Unix tools git clone https://anongit.hacktivis.me/git/utils-std.git
commit: 0ef70525902af352cfcc63156af91f762e5f028d
parent d6627c25b65ca3eb396172fd637403a613a0ebd5
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Wed, 18 Sep 2024 08:11:18 +0200

cmd/tee: add missing getopt cases

Diffstat:

Mcmd/tee.c8++++++++
1 file changed, 8 insertions(+), 0 deletions(-)

diff --git a/cmd/tee.c b/cmd/tee.c @@ -37,6 +37,14 @@ main(int argc, char *argv[]) case 'i': /* ignore SIGINT */; signal(SIGINT, SIG_IGN); break; + case ':': + fprintf(stderr, "tee: Error: Missing operand for option: '-%c'\n", optopt); + return 1; + case '?': + fprintf(stderr, "tee: Error: Unrecognised option: '-%c'\n", optopt); + return 1; + default: + abort(); } }