I want to use an awk for the following scenario but not sure if it will work or not. I have two input file: F1 and F2
F1
02
05
08
F2
00
01
02
03
04
05
06
07
08
09
10
I need to loop through all records in F1 and search for them in F2. If all records on F1 are on F2 then we are successful and returncode = 0. If all records on F1 are not on F2, then unsuccesful and returncode = 1. I was hoping an awk could help in this instance, but not sure how to do it in regular scripting. records are not always in sorted order, so do I need to sort the records of each file first, or once can I start at the beginning of F2 for each record on F1.
Thanks.