From 9293f6cd00251328777b1d0a5df47647e95eeca1 Mon Sep 17 00:00:00 2001 From: Clemens Schwaighofer Date: Fri, 30 May 2025 09:35:09 +0900 Subject: [PATCH] Fix wrong empty check used -n instead of -z --- screen_init.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/screen_init.sh b/screen_init.sh index f4fca6c..d409141 100755 --- a/screen_init.sh +++ b/screen_init.sh @@ -49,7 +49,6 @@ fi; if [ $ERROR -eq 1 ]; then exit; fi; - # termcap (echo $TERMCAP) # http://web.mit.edu/gnu/doc/html/screen_15.html#SEC89 # in screen ^-a . to dump current termcap @@ -83,13 +82,13 @@ do continue; fi; # skip empty lines - if [ -n "$line" ]; then + if [ -z "$line" ]; then continue; fi; if [ $pos -eq 0 ]; then # should I clean the title to alphanumeric? (well yes, but not now) SCREEN_NAME=$line; - if [ -n "$SCREEN_NAME" ]; then + if [ -z "$SCREEN_NAME" ]; then echo "No screen name set"; exit; fi;