From 1b276a74fe81beca8bcee4d896c27cb9db65f005 Mon Sep 17 00:00:00 2001 From: Mcat12 Date: Sun, 8 Jul 2018 16:03:16 -0400 Subject: [PATCH] Display all lines of a list, even if there is no newline at the end Signed-off-by: Mcat12 --- advanced/Scripts/list.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/advanced/Scripts/list.sh b/advanced/Scripts/list.sh index d9036f42..0088e0c1 100755 --- a/advanced/Scripts/list.sh +++ b/advanced/Scripts/list.sh @@ -222,7 +222,7 @@ Displaylist() { verbose=false echo -e "Displaying $string:\n" count=1 - while IFS= read -r RD; do + while IFS= read -r RD || [ -n "${RD}" ]; do echo " ${count}: ${RD}" count=$((count+1)) done < "${listMain}"