How would you remove a specific string from a text file (command line) e.g.
hello
goodbye
goodbye
hello
hello
hello
goodbye
In this case I would like to remove all occurrences of "goodbye"
Either linux or Windows, (as longs as the linux command is available in GNU)
If you are looking for Linux file through Vi mode. Please find below solution which helped me out
:g/goodbye/d - This will delete all goodbye's
:%g!/goodbye/d - This will delete all except goodbye's
To delete multiple words: