I've recently been writing command lines tool (for internal use mostly) and wrote them in bash because running other command line tools and checking their exit codes is simpler in bash than in Python for example. Problems start to come up when I have to deal with APIs that return or expect JSON.
From what you're writing it seems that it might be worth checking Go out for that. Would you happen to have pointers for using Go for that purpose?