Guest User

Untitled

a guest
Oct 22nd, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.11 KB | None | 0 0
  1. 0002 T00005 006 15
  2. 0004 T00004 012 26
  3. .
  4. .
  5. etc
  6.  
  7. T00001 Larry Lastname Corley 555 555-5555
  8. T00002 Ron Lastname Coreley 555 111-1111
  9. .
  10. .
  11. etc
  12.  
  13. # of sections | Instructor ID # | FirstName | LastName
  14.  
  15. $ cat sections/sem092 | sort -k 2 | awk '{ print $2 }' | uniq -c
  16.  
  17. Num. of Sections Taught | Instructor ID #
  18.  
  19. cat sections/sem092 | sort -k 2 | awk '{ print $2 }' | uniq -c > firstPart.txt
  20.  
  21. cat $1 | while read line; do
  22. instructorID=`echo $line | awk '{print $2}'`
  23. name=`grep $instructorID instructorList | awk '{print $2 " " $4}'`
  24. echo "$line $name"
  25. done
  26.  
  27. 5 T00005
  28.  
  29. bash searchInstructorName.sh firstPart.txt
  30.  
  31. cat $1 | sort -k 2 | awk '{ print $2 }' | uniq -c | while read line; do
  32. instructorID=`echo $line | awk '{print $2}'`
  33. name=`grep $instructorID $2 | awk '{print $2 " " $4}'`
  34. echo "$line $name"
  35. done
  36.  
  37. bash searchInstructorInfo.sh sections/sem092 instructorList
  38.  
  39. cat sections/sem092 | sort -k 2 | awk '{ print $2 }' | uniq -c > no3
  40. paste instructors | awk '{ print $2 " " $3 }' > no3n
  41. #guess I could have just used cat above
  42. paste no3 no3n
Add Comment
Please, Sign In to add comment