I'm using a bash script to retrieve the differences between two text files:
`
# Do the match between the text files                                                                                                                                                                                                                                                                                  
   echo " "
   echo "match with diff: "
   echo " "
   diff -s FromRucio_$NAME.txt  FromFolder_$NAME.txt
   diff -q FromRucio_$NAME.txt  FromFolder_$NAME.txt
   echo ""
   echo "this is the missing files between the files"
   echo "sample: $NAME \n" >> totalresult_test.txt
   sort FromRucio_$NAME.txt FromFolder_$NAME.txt|uniq -u >> totalresult_test.txt
#  diff --brief <(sort file1) <(sort file2)                                                                                                                                                                                                                                                                               
   echo "_____________________________________________________________________________________"
   echo " "
`
note: the diff commands are executed but when diff -s pass diff -q generate some ouput and vice versa. How can avoid this? i mean, generate a boolean condition when one of them generates an ouput and just pass the next command diff-line.
I would like to create a condition (maybe driven with just a boolean variable) to retrieve the output information from the "sort (...) " line when diff -q command works.
i hope to add new lines to totalresul_test.txt with the sample name and the missing found files from the sort-line bash command.}
Regards
 
     
    