Delete multiple lines in a file based on the input text
I've a 15 lakh lines file. I need to delete 7000 lines in that file. Please see the sample file content below. All I have is the id (1st column). Based on the id, I have to delete the entire line in that file. The ID column will contain unique numbers(same id will not repeat).
Suppose, i have to delete 6666666 and 2222222 id lines. I would like to mass or bulk delete the 7000 lines based on the 7000 id i'm having. Can someone please suggest the command or script to delete the lines ?
1111111~first name2~last name2~address 2 123~test
6666666~first name2~last name2~address 2 123~test
2222222~first name2~last name2~address 2 123~test
5555555~first name2~last name2~address 2 123~test
|