Fix wrong empty check
used -n instead of -z
This commit is contained in:
@@ -49,7 +49,6 @@ fi;
|
|||||||
if [ $ERROR -eq 1 ]; then
|
if [ $ERROR -eq 1 ]; then
|
||||||
exit;
|
exit;
|
||||||
fi;
|
fi;
|
||||||
|
|
||||||
# termcap (echo $TERMCAP)
|
# termcap (echo $TERMCAP)
|
||||||
# http://web.mit.edu/gnu/doc/html/screen_15.html#SEC89
|
# http://web.mit.edu/gnu/doc/html/screen_15.html#SEC89
|
||||||
# in screen ^-a . to dump current termcap
|
# in screen ^-a . to dump current termcap
|
||||||
@@ -83,13 +82,13 @@ do
|
|||||||
continue;
|
continue;
|
||||||
fi;
|
fi;
|
||||||
# skip empty lines
|
# skip empty lines
|
||||||
if [ -n "$line" ]; then
|
if [ -z "$line" ]; then
|
||||||
continue;
|
continue;
|
||||||
fi;
|
fi;
|
||||||
if [ $pos -eq 0 ]; then
|
if [ $pos -eq 0 ]; then
|
||||||
# should I clean the title to alphanumeric? (well yes, but not now)
|
# should I clean the title to alphanumeric? (well yes, but not now)
|
||||||
SCREEN_NAME=$line;
|
SCREEN_NAME=$line;
|
||||||
if [ -n "$SCREEN_NAME" ]; then
|
if [ -z "$SCREEN_NAME" ]; then
|
||||||
echo "No screen name set";
|
echo "No screen name set";
|
||||||
exit;
|
exit;
|
||||||
fi;
|
fi;
|
||||||
|
|||||||
Reference in New Issue
Block a user