deleted default cutoff, changed regex

This commit is contained in:
s495716 2024-03-20 17:34:38 +01:00
parent 318baf240a
commit 401903bd0e

View File

@ -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"