From 229ac0bd0cfb8b8014b65959a2a4e6755f5a632b Mon Sep 17 00:00:00 2001 From: michalzareba Date: Sun, 28 Mar 2021 20:30:56 +0200 Subject: [PATCH] add cutoff --- Jenkinsfile | 1 + script.sh | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 223058e..6730868 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -14,6 +14,7 @@ pipeline{ } stage('sh: Shell Script'){ steps{ + withEnv(["CUTOFF=${params.CUTOFF}"]) ./script.sh } } diff --git a/script.sh b/script.sh index 682307e..087d273 100644 --- a/script.sh +++ b/script.sh @@ -1,7 +1,7 @@ #!/bin/bash curl -LO https://git.wmi.amu.edu.pl/s430705/ium_430705/raw/branch/master/imdb_movies.csv -head -n -1 imdb_movies.csv | shuf > imdb_movies.csv.shuf +head -n -1 imdb_movies.csv | tail -n +$((${CUTOFF}+1)) > imdb_movies.csv | shuf > imdb_movies.csv.shuf wc -l imdb_movies.csv head -n 4600 imdb_movies.csv.shuf > test.csv head -n 4600 imdb_movies.csv.shuf | tail -n 4600 > dev.csv