Given this data
34 foo
34 bar
34 qux
62 foo1
62 qux
78 qux
I want to replace the string at 2nd column into "" if it is "qux". Resulting:
34 foo
34 bar
34
62 foo1
62
78
How do you do that with sed? In particular the data is very big with ~10^7 lines