I have a follow-up question on Checking if output of a command contains a certain string in a shell script. However, the answers given in this post do not suit my problem. F