#!/usr/bin/expect -f set timeout 4 spawn $env(SHELL) match_max 100000 # check ip address send -- "firejail --net=br0 --quiet\r" expect { "Child process initialized" {puts "TESTING ERROR 1\n";exit} "Interface" {puts "TESTING ERROR 1\n";exit} } sleep 1 send -- "\r" puts "\nall done\n"