#!/usr/bin/expect -f set timeout 10 spawn $env(SHELL) match_max 100000 send -- "firejail\r" expect { timeout {puts "TESTING ERROR 1\n";exit} "Child process initialized" } sleep 1 send -- "firejail\r" expect { timeout {puts "TESTING ERROR 1\n";exit} "Warning: an existing sandbox was detected" } sleep 1 puts "\nall done\n"