There are specific lines that I want to remove from a file. Let's say it's line 20-37 and then line 45. How would I do that without specifying the content of those lines?
How do I remove certain lines (using line numbers) in a file?
text processing
With sed, like so:sed '20,37d; 45d' < input.txt > output.txtIf you wanted to do this in-place:sed --in-place '20,37d; 45d' file.txt