Shell testing not working great. Cant capture output like I want to using command substitution.