From b95e3be972fe967b88c7988adc74869ea1cf208d Mon Sep 17 00:00:00 2001 From: Timo Schmidt Date: Wed, 15 Mar 2023 15:49:44 +0100 Subject: [PATCH] Add comment about improvment in comment v grepping --- ex07/r_dwssap.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ex07/r_dwssap.sh b/ex07/r_dwssap.sh index 0ba65e3..abca1c8 100755 --- a/ex07/r_dwssap.sh +++ b/ex07/r_dwssap.sh @@ -1,8 +1,13 @@ #!/bin/sh +# FT_LINE1=7 +# FT_LINE2=15 + FT_DIFF=$((FT_LINE2 - FT_LINE1 + 1)) cat /etc/passwd | + # Not perfect, will discard line that contain a # + # anywhere in the line, not just the beginning grep -v '#' | sed '1d' | awk 'NR % 2 == 1' |