#!/bin/bash HOST=root@onfarbo43 DATEJ=$(date +%u) DATES=$(date +%W) semaineMod=$(("${DATES}" % 4)) ssh "${HOST}" "mysqldump -u ap43 -pAzerty1+ bdarbre | gzip" > /root/sauv/jour/bdarbre43-"${DATEJ}".sql.gz ssh "${HOST}" "mysqldump -u ap43 -pAzerty1+ bdarbre | gzip" > /root/sauv/semaine/bdarbre43-"${semaineMod}".sql.gz scp -r "${HOST}":/var/www/html/PHPProjectsAM/ /root/sauv/php43/AM scp -r "${HOST}":/var/www/html/PHPProjectsAS/ /root/sauv/php43/AS exit 0