From 419d441b042ca11d0a2b056e8f7bfc587d11147a Mon Sep 17 00:00:00 2001 From: John Coleman Date: Sat, 20 Oct 2018 14:33:05 -0700 Subject: [PATCH] updated until conditional --- note_taker.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/note_taker.bash b/note_taker.bash index 31f473e..cf9d5cb 100755 --- a/note_taker.bash +++ b/note_taker.bash @@ -107,7 +107,7 @@ handle_options () { # get the text of the penultimate line and assign it to LINE_TEXT LINE_TEXT="$(tail -n +$LINE_NUMBER $NOTE_PAD_PATH | head -n 1)" # as long as LINE_TEXT is not empty and LINE_NUMBER is not 0 - until [ -z "$LINE_TEXT" ] || [ "$LINE_NUMBER" -eq 0 ]; do + until [[ -z "$LINE_TEXT" || "$LINE_NUMBER" -eq 0 ]]; do echo "... removing $LINE_TEXT" # delete the last line of the notes file by copying a shortened version # to a temp file and then overwriting the original with the temp