Hiding error report

Hi Guys,

Error report is still displaying on the console after executing the below command. Is there any error in the syntax?

check_event=$(cat /sbt/driver/RegressionTests/ResultsArchive/${environment[$i]}/$backupPath/TestEvents.txt | g
rep "Test Cases FAIL" | cut -c 18-) 2> log2

What kind of error do you get?

I do not want the error report to display on the console. But it is still displaying....

It could be an error of cat, grep or cut.

Try to redirect the error of the commands e.g. for the cat command:

check_event=$(cat /sbt/driver/RegressionTests/ResultsArchive/${environment[$i]}/$backupPath/TestEvents.txt 2> log2| grep "Test Cases FAIL" | cut -c 18-)

why exactly do you need a 'cat'?

check_event=$(grep "Test Cases FAIL" /sbt/driver/RegressionTests/ResultsArchive/${environment[$i]}/$backupPath 2> log2| cut -c 18-)