FAL-soluzioni/02-create_dirs/03.sh
2019-05-11 14:17:48 +02:00

15 lines
229 B
Bash

#!/usr/bin/env bash
START=$(date --date="20190101" +%s)
LEN=$(date +%j)
for INTDATE in $(seq $LEN)
do
DELTA=$(( INTDATE*86400 ))
TIME=$(( START+DELTA ))
DATE=$(date --date="@${TIME}" +%Y%m%d)
mkdir $DATE
done