Bonjour à tous, Voila j'ai un script shell de type expect qui me permet d'ouvrir minicom, apres avoir réalisé mes commandes je souhaite quitter et fermer le process minicom, le probleme c'est que ca ne se ferme pas, j'ai essayé beaucoup de chose mais en vain,
voila le script
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26 #!/usr/bin/expect -f set arg1 [lindex $argv 0] set arg2 [lindex $argv 1] spawn minicom expect { "#" "password:" "Q0" } set timeout 15; send "\r" expect "buildroot login:" # Send the username send "root\r" set timeout -1; expect "#" send "\r" expect "#" # Send the prebuilt command, and then wait for another shell prompt. send "test_general_zapper_st -g 0-$arg1-$arg2\r" set timeout -1; #the timeout must be bigger than the timeout of the fct poll in the test. expect "#" expect eof
Partager