Process handling functions for executing commands with BASH