From b6f1b9ac5816dc59276c814185252b127befc754 Mon Sep 17 00:00:00 2001 From: Thomas Constans Date: Thu, 8 Feb 2024 15:06:34 +0100 Subject: [PATCH] script accept report directory as argument, with ~tom/MCO as default --- check.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/check.sh b/check.sh index ec96fe4..6cf2063 100644 --- a/check.sh +++ b/check.sh @@ -4,7 +4,11 @@ set -u set -o pipefail -exec 1> $(date -I)_$(hostname).report +test $# -lt 1 && dir=/home/tom/MCO || dir=$1 + +mkdir -p ${dir} || exit 5 + +exec 1> ${dir}/$(date -I)_$(hostname).report echo -ne "\n\n########## $(hostname) ##########\n"