'Is there any way to edit specific line in a file without opening the file? [duplicate]

I have an 18G XML file with some unwanted words as prefixes. I want to remove that part. It's tough to open such a big file and edit[RAM limitation]. Is there any way to open the file and edit that line and save it by code or command-line execution?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source