Comment faire pour démarrer un script shell dans “script expect”?

Dans ce script expect il n'y aura pas de serveur ssh connecté, je veux juste l'exécuter ".sh" fichier localement, est-ce possible?

Par exemple:

#!/bin/expect

command "xxx.sh" # a command which starts a certain shell script

Aussi, est-il possible d'exécuter un script expect à l'intérieur d'un script expect?

Par exemple:

#!/bin/expect

command "xxx.exp" # a command which starts a certain expect script

Toute aide?

Pourquoi est-il important de savoir si il y a un serveur SSH connecté? Attendre n'a pas de relation particulière avec SSH.

OriginalL'auteur user3636706 | 2014-05-14