#!/usr/bin/expect -f set timeout 10 spawn $env(SHELL) match_max 100000 send -- "firejail --chroot=/tmp/chroot /bin/bash\r" expect { timeout {puts "TESTING ERROR 0\n";exit} "invalid /tmp/chroot/etc/resolv.conf file" } puts "\nall done\n"