Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Replace in multiple files - graphical tool for Linux

Tags:

It needs to be graphical. No sed, awk, grep, perl, whatever. I know how to use those and I do use them now, but I need to cherry-pick each replace in 300+ files.

I want a tool where I can:

  • type a search string
  • type a replace string
  • select a directory and file extension

and it would recursively go into each file in that directory and its sub-directories, open it and scroll to the place where search string is and offer two options:

  • replace (and find next)
  • find next

Nothing more. Reg.exp. support is a plus, but not required.

SOLVED: Regexxer is exactly what I needed. In case someone needs it on Slackware, here's what you need to download and how to compile it (choosing correct version of each dependency can be a PITA)

like image 729
Milan Babuškov Avatar asked Oct 09 '08 20:10

Milan Babuškov


People also ask

How do I find and replace text in multiple files in Linux?

Find and replace text within a file using sed command Use Stream EDitor (sed) as follows: sed -i 's/old-text/new-text/g' input.txt. The s is the substitute command of sed for find and replace. It tells sed to find all occurrences of 'old-text' and replace with 'new-text' in a file named input.txt.


1 Answers

I think regexxer is exactly what you're looking for:

Regexxer

regexxer is a nifty GUI search/replace tool featuring Perl-style regular expressions. If you need project-wide substitution and you’re tired of hacking sed command lines together, then you should definitely give it a try.

See also the screenshot, looks a lot like what you're describing:

screenshot

like image 106
Jay Avatar answered Sep 23 '22 18:09

Jay