awk + sorting file according to values in the file and write two diffrent files
- by yael
hi
I have in file file_test values of right eye and left eye
How to separate the file_test to file1 and file2 by awk in order to write the equal values on file1 and different values on file2 as the following example down
THX
file_test:
NAME: jim
LAST NAME: bakker
right eye: |5|<
left eye VALUE: |5|<
NAME: Jorg
LAST NAME: mitchel
right eye: |3|<
left eye VALUE: |5|<
NAME: jimmy
LAST NAME: kartter
right eye: |6|<
left eye VALUE: |5|<
NAME: david
LAST NAME: kann
right eye: |9|<
left eye VALUE: |9|<
file1:
NAME: jim
LAST NAME: bakker
right eye: |5|<
left eye VALUE: |5|<
NAME: david
LAST NAME: kann
right eye: |9|<
left eye VALUE: |9|<
file2:
NAME: Jorg
LAST NAME: mitchel
right eye: |3|<
left eye VALUE: |5|<
NAME: jimmy
LAST NAME: kartter
right eye: |6|<
left eye VALUE: |5|<