Advertisement
cd62131

Substitute

Jul 15th, 2014
682
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Awk 0.29 KB | None | 0 0
  1. #!/usr/bin/awk -f
  2. BEGIN {
  3.   while (getline < "id.txt") {
  4.     id[$0] = 1
  5.   }
  6.   FS = ","; OFS = ","
  7.   while (getline < "list.txt") {
  8.     if (id[$2]) {
  9.       for (i = 1; i <= NF; i++) {
  10.         if ($i == "F0") {
  11.           $i = "F8"
  12.         }
  13.       }
  14.       $0 = $0
  15.     }
  16.     print
  17.   }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement