I'm trying to check if a scan of an Accumulo table times out (to see if the table is corrupted).#!/bin/bashtimeout -s KILL 20s accumulo shell -zi myInstance -u root -p secret -e scan -np -t myTableif [ $? -eq 0 ]; then  echo 'Scan successful'else  echo 'Scan timed out'fiThe script runs the full 20 seconds and doesn't execute the accumulo shell command, and also returns a 0 exit status incorrectly. If I run the above timeout command in a terminal the command runs as expected. If I run a basic timeout command (e.g. timeout -s KILL 20s sleep 10) in the script or in a terminal, that works as well. So for some reason the combination of a timeout and accumulo shell command in a bash script does not work.Accumulo version: 1.6.0-cdh4.6.0OS version: CentOS 6.6 
timeout doesn't work with accumulo shell in bash script
shell script;timeout
I discovered the issue stems from running the command in a different shell. If I run the script using the source command, e.g. source myScript.sh, the script runs as expected. However, I haven't yet been able to track down why running the combination of timeout and accummulo shell in a different shell doesn't work. 