From 9e4b0a7a58b3d7803c171eab2d146237b55521c0 Mon Sep 17 00:00:00 2001 From: Siraaj Khandkar Date: Wed, 4 Sep 2019 19:07:21 -0400 Subject: [PATCH] Warn if list item appears more than once --- list | 3 +++ 1 file changed, 3 insertions(+) diff --git a/list b/list index 04d5d3c..2c518e8 100755 --- a/list +++ b/list @@ -6,6 +6,9 @@ END { for (x in xs) { + if (xs[x] > 1) { + printf ">>> [WARNING] : '%s' was listed %d times.\n", x, xs[x] > "/dev/stderr" + } printf("%s%s", sep, x) sep = " " } -- 2.20.1