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 into file1
and different values into file2
as the following example down
file_test
is:
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
should be:
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
should be:
NAME: Jorg
LAST NAME: mitchel
right eye: >|3|<
left eye VALUE: >|5|<
NAME: jimmy
LAST NAME: kartter
right eye: >|6|<
left eye VALUE: >|5|<