From 401903bd0ea5e4c97227c9805733551eae477ed3 Mon Sep 17 00:00:00 2001 From: Daniel Porzucek Date: Wed, 20 Mar 2024 17:34:38 +0100 Subject: [PATCH] deleted default cutoff, changed regex --- data_download.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/data_download.sh b/data_download.sh index 050136e..9991bd8 100644 --- a/data_download.sh +++ b/data_download.sh @@ -12,13 +12,12 @@ figlet "TESTSET AFTER ID COLUMN CUT" head -n 5 test_without_id_column.csv figlet "CUTOFF DATA FROM TRAIN SET" -cutoff="10" shift "$(($OPTIND - 1))" if [[ "$1" == "--cutoff" ]]; then shift - if [[ ! "$1" =~ ^[0-9]+$ ]]; then + if [[ ! "$1" =~ ^[1-9][0-9]*$ ]]; then echo "Error: cutoff value must be a positive number" - exit 1 + exit 1 fi cutoff=$(("$1" + 1)) echo "CUTOFF $cutoff"