I have a large text file which contains numerous instances of the word 'Ref' (from where the text was copied from a website which contained a reference). I only want to keep the original website text without these instances of 'Ref'. I was wondering what is the simplest way of removing all instances from the text file? Is is possible via command line using windows cmd or cygwin?
Asked
Active
Viewed 2,130 times
0
-
1Possible duplicate of [String replace file content with PowerShell](http://stackoverflow.com/questions/17144355/string-replace-file-content-with-powershell) – DaveShaw Jan 31 '16 at 16:49
-
In cygwin: `sed -i.old 's/Ref//g' yourfile.txt` – mustaccio Jan 31 '16 at 16:57
1 Answers
0
I don't think you necessarily need the command line to do such a task. I would recommend that you do a Ctrl+F (PC) Command+F (Mac) find all "Ref" and replace with empty string (in other words leave the replace box empty). Hit enter and all done!
Hope this helps!

Kem Andrew
- 26
- 4