Run via Menu>Filesystem>Turma2Utility for searching for and, optionally, replacing strings in both text and binary files. This is a fork of original turma project located at: http://turma.sourceforge.net/software/turma/index.html This fork was made after decision to remove obsolete GTK1 libraries from the AUSTRUMI linux distribution. Seems like original project authors is not supporting it anymore.
Turma2 - Gtk2 search & replace tool
Turma2 - Gtk2 search & replace tool
https://launchpad.net/turma2
- Attachments
-
- turma2-0.3.1.pet
- (41.81 KiB) Downloaded 837 times
I get this error
tried it on quirky 1.2.0 nop
Geoffrey
Code: Select all
# turma2
turma2: symbol lookup error: turma2: undefined symbol: gtk_info_bar_new
Geoffrey
- technosaurus
- Posts: 4853
- Joined: Mon 19 May 2008, 01:24
- Location: Blue Springs, MO
- Contact:
Wow, extremely simple ...I may just add a frontend to my one-liner that I use for the same purpose .... I didn't realize there was a need. Brb.
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].
You can get the original GTK1 version here:
http://distro.ibiblio.org/pub/linux/dis ... turma-0.1/
http://distro.ibiblio.org/pub/linux/dis ... turma-0.1/
Hello Geoffrey,
yes, it probably needs newer gtk2 version. I was unable to get it to compile with either p412 or p431. Or, if you install these:
glib12-1.2.10.pet (53k)
gtk+12-1.2.10.pet (522k)
then the gtk1 version of turma, that amigo mentions, should work. A .pet of the gtk1 version is here: turma.
yes, it probably needs newer gtk2 version. I was unable to get it to compile with either p412 or p431. Or, if you install these:
glib12-1.2.10.pet (53k)
gtk+12-1.2.10.pet (522k)
then the gtk1 version of turma, that amigo mentions, should work. A .pet of the gtk1 version is here: turma.
muggins,
Thanks, this has a nice interface (much better than the original). I tried it in lupu510 and it worked except for the right-click on found items did not go to the folder.
technosaurus
Regards,
s
Thanks, this has a nice interface (much better than the original). I tried it in lupu510 and it worked except for the right-click on found items did not go to the folder.
technosaurus
That must be a real long one-linerWow, extremely simple ...I may just add a frontend to my one-liner that I use for the same purpose .... I didn't realize there was a need
Regards,
s
- technosaurus
- Posts: 4853
- Joined: Mon 19 May 2008, 01:24
- Location: Blue Springs, MO
- Contact:
not realy, here is a simplified version in script formseaside wrote:That must be a real long one-liner
Code: Select all
#!/bin/sh
find . -iname \*$3 -exec sed -i "s/"$1"/"$2"/g" {} ';' -print
$2 is what you want to replace it with
$3 is the ending of a file (ex. akefile to get Makefile and makefile or .txt to only do text files)
if this is all you want to do, then find is not necessary (i just use simple shell commands to recurse all subdirectories) , but this way maybe someone can add it as an option to pfind if they'd like (which uses various other find parameters)
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].
technosaurus,technosaurus wrote: find . -iname \*$3 -exec sed -i "s/"$1"/"$2"/g" {} ';' -print[/code]
Thanks that looks quite handy - I think I'll just make that a function and slip it into my .bashrc file.
My comfort level would be much higher with a typical "editor type" search and replace function across files. Enter a file pattern, find word, and replace word; then be presented with a window of grep-like line finds -
FILENAME *line-context...found-word....*
Here, you could individually-or multi-select lines and then do a "Replace ok, Skip, or Replace All".
Regards,
s
- technosaurus
- Posts: 4853
- Joined: Mon 19 May 2008, 01:24
- Location: Blue Springs, MO
- Contact:
That's pretty doable, just store the find results for the filenames separately, then use grep in a loop with sed to get the line numbers and replace (i don't know if busybox sed can be limited to a specific line though ... in case someone is using a pupngo puplet)
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].
Here's a limited protype that just needs a front end.
This is probably better in Gtkdialog- at least you get more buttons there.
Cheers,
s
Code: Select all
#!/bin/sh
DIR=/etc
SEARCH=copyright
REPLACE=Copyright
#################
grep -R $SEARCH $DIR >/tmp/finds
while read -r line
do
Xdialog --center --title "Mutiple file search and replace" --ok-label "Replace" --cancel-label "Skip" --combobox "Replace $SEARCH with $REPLACE" 800x100 "$line"
RETVAL=$?
if [ $RETVAL -eq 0 ]; then
FN=`echo $line | cut -d: -f1 `
sed -i "s/$SEARCH/$REPLACE/g" "$FN"
fi
if [ $RETVAL -eq 255 ]; then
exit
fi
done < /tmp/finds
Cheers,
s
Turma as it is is useful
Moi Turma me va. Turma as it is is useful
.avi list all my videos, even more files.
.avi list all my videos, even more files.