Wednesday, December 8, 2021

How to replace a specific string in a very large text file

Here is how I removed the string "public." from a 4G file:
sed -i 's/public\.//g' mylargetextfile.txt
Notice the forward slash in front of the puncuation mark. It tells sed to interpret it literally, not as a special character used in regular expressions. Source: Stackoverflow

No comments:

Post a Comment