cat file_1.txt100 200 name100 200100 200150 300150 300150 250150 250150 300 namefinal file should be 150 300150 300150 250150 250i am using this command cat file_1.txt | grep -v name>file_2.txt; cat file_2.txt| while read line;do cat file_1.txt| grep $line| head -1|grep -v name ;donebut data is too much cant use while loop it is taking to much time cat use while loop . is there any other way to do it fast like using grep -vf file_1 file_2 something like that By passing like that  . please let me know.here i am using the logic of getting the top most line of pattern found pattern is  every line of file_1.txt
Cant use while loop because it is taking time is there any way faster way to get the final file..in linux
shell script;text processing;grep