Scripting a 'Find-and-Replace' for big text files

Posted by eldersnake on Apr 23, 2014 10:10 AM EDT
The Linux Rain; By Bob Mesibov
Mail this story
Print this story

I use two different GUI text editors. Mousepad does my basic editing jobs in a single window, while Gedit gives me tabbed windows, syntax highlighting and (with the Draw Spaces plug-in) a toggle-able view of whitespace and tabs.

Unfortunately, both Mousepad and Gedit struggle with big text files, say 10 mb and up. In contrast, finding strings on the command line with grep is zippety-quick, even for huge text files. String replacement with sed is also pretty fast. I recently wrote a simple shell script for finding-and-replacing in some very large text files I was editing.

Full Story

  Nav
» Read more about: Story Type: Tutorial; Groups: Linux

« Return to the newswire homepage

This topic does not have any threads posted yet!

You cannot post until you login.