#!/bin/bash ip=$1 user=root workdir=/$user/deploy ssh $user@$ip "mkdir $workdir" 2> /dev/null #copie des scripts et fichier scp createGroups.sh $user@$ip:$workdir scp createUsers.sh $user@$ip:$workdir scp login.csv $user@$ip:$workdir scp Users.csv $user@$ip:$workdir #execution des scripts ssh $user@$ip "cd $workdir ; bash createGroups.sh ; bash createUsers.sh" ssh $user@$ip "rm -R $workdir" #suppression