I have a problem doing the following process in bash script:
f=0
for ((i=0; i<=1000; i++)) {
# do something
if [ diff -w out_1 out_2 ]
then
f=1
break
fi
}
I mean, if the diff command gave anything as an output(the files were different), break the loop and set the variable f
to 1
but this gives error and I couldn’t find any way to do it