From 8aa81c8b4842ece57af77e5edd99ecf3b5f6c305 Mon Sep 17 00:00:00 2001 From: Thomas Constans Date: Tue, 22 Jun 2021 11:57:04 +0200 Subject: [PATCH] mise au point --- script.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/script.sh b/script.sh index f88e1fb..e20d99d 100644 --- a/script.sh +++ b/script.sh @@ -1 +1,16 @@ +#! /bin/bash + +set -u +set -e + +#today=`date "+%d"` +today=$(date "+%d") + +tmrw=$(($today + 1)) +ytd=$(($today - 1)) +mkdir -p /tmp/$(hostname -s) +cd /tmp/$(hostname -s) +mkdir -p $today $tmrw $ytd + +# ou en une seule ligne: mkdir -p /tmp/$(hostname -s)/{$(($(date "+%d")-1)),$(($(date "+%d")-2)),$(date "+%d")} \ No newline at end of file