Question : command line if output of command is equal to string
Answered by : rich-raccoon-nj9y4fw6g9jo
if [[ $(< your command giving output >) = *< substring to match >* ]]; then < your command if the substring is found anywhere in the output >
fi
Source : https://unix.stackexchange.com/questions/52800/how-to-do-an-if-statement-from-the-result-of-an-executed-command | Last Update : Tue, 08 Jun 21