no save
Assistance
Achat
News

Forum | Linux/Unix
script sur machine distante avec ssh
nabil1706, le lun. 18 déc. 2006 à 11:18:09
Bonjour
voila mon script sur une machine distante :
#/bin/sh
_arg=$#

if [ $# -ne 1 ]; then
echo "Vous n'avez pas passe le bon nombre de parametre"
exit;
fi

get() {
file=$1;
nb=$2;
the_date=$(date '+%m'"_"'%Y')
echo $(tail -n 1 /home/voicemail/Statistics/Daily/Output/$file"_rep_"$the_date".csv" | cut -d',' -f$nb)
# > output.txt
}

arg=$1;

case $arg in
Call) get "StatProfileDailyCall" 2;
;;
Call1) get "StatProfileDailyCall" 3;
;;
Call2) get "StatProfileDailyCall" 5;
;;
Duration1) get "StatProfileDailyDuration" 2;
;;
Duration2) get "StatProfileDailyDuration" 3 ;
;;
Duration3) get "StatProfileDailyDuration" 6;
;;
Duration4) get "StatProfileDailyDuration" 7;
;;
Mbox) get "StatProfileDailyMbox" 2;
;;
Msg) get "StatProfileDailyMsg" 2;
;;
*) exit
;;
esac

J'aurai besoin d'un script qui lance ce script depuis une autre machine en ssh.... (donc en memorisant aussi mon mot de passe)
merci de votre aide Configuration: Windows XP
Internet Explorer 6.0


mamiemando
déc. 06
Suivant
REPONSES
mamiemando
déc. 06
jipicy
déc. 06
nabil1706
déc. 06
nabil1706
déc. 06
mamiemando
déc. 06
nabil1706
déc. 06
mamiemando
déc. 06
nabil1706
déc. 06
mamiemando
déc. 06
nabil1706
déc. 06
Version Web
Réalisé par RedShift
no save