I want to run a script like below:for i in `cat`;do result=command $i |awk '{print $2}'  ## it may give us the exact anwer or error like command not foundecho $i - $result  donefor every $i, I want to print:$i - $result    # if success$i - NO RESULT  # if I got command not found error
Suppress error in shell script
scripting