#!/bin/sh # on cherche à zigouiller automatiquement # un processus netscape qui traine # manuellement : # $ ps -U h-etie00 -H | grep communicator # 3109 ? 00:04:32 communicator-sm # $ kill -9 3109 # automatiquement : # a=`ps -U h-etie00 -H | grep communicator` # set $a # kill -9 $1 # et voila !!! # reste à faire une boucle au cas où y'en ait plusieurs. # D E B U T D U S C R I P T a=`ps -U h-etie00 -H | grep communicator` # initialisation echo "Initialisation finie"; while !(test -z $a) # vrai si la chaîne $a est non vide do echo "Création des variables..." ; set $a; # création d'une variable pour chacun des mots de $a echo ".. création terminée"; kill -9 $1; # utilise le 1er mot echo "Suppression d'un processus effectuée" a=`ps -U h-etie00 -H | grep communicator`; # et rebelotte done echo "Terminé" # fin du script