i got these files:
files: Prac1, Prac2, Prac3 (these 3 files have the same format), the format :
Prac1
20693680 10
20179687 9
20781637 5
21907894 6
Prac2
20693680 8
20179687 6
21907894 2
Prac3
20693680 8
21907894 9
file STUDENTS, the format:
20693680:familyname, firstname
20179687:familyname, firstname
20781637:familyname, firstname
21907894:familyname, firstname
How can i use these files to produce a file called MISSING that this file is finding out which ID number has miss out the prac in the file Prac1, Prac2 and Prac3? Using bourne shell script.
Output file called Missing:
20179687 Prac3
20781637 Prac2, Prac3
i am thinking of this
cat Students | while read Student_ID
for num in 1 2 3 #which is for Prac 1, Prac2 and Prac3
# for line in (length of file)
#while any line match with the Student_id
#then print nothing
#else print the Student_ID: Prac 1 or i ??
#if there is a Prac after the Student_id
#then need a , and then print the second one and third one
#to a file called Missing
done
Can anyone please help me with this question?