Author |
Message |
muggins
Joined: 20 Jan 2006 Posts: 6747 Location: hobart
|
Posted: Fri 13 May 2011, 01:16 Post subject:
Turma2 - Gtk2 search & replace tool |
|
https://launchpad.net/turma2
Quote: | Utility 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. |
Run via Menu>Filesystem>Turma2
Description |
|

Download |
Filename |
turma2-0.3.1.pet |
Filesize |
41.81 KB |
Downloaded |
703 Time(s) |
|
Back to top
|
|
 |
Geoffrey

Joined: 30 May 2010 Posts: 2345 Location: Queensland
|
Posted: Sat 14 May 2011, 00:35 Post subject:
|
|
I get this error Code: | # turma2
turma2: symbol lookup error: turma2: undefined symbol: gtk_info_bar_new
|
tried it on quirky 1.2.0 nop
Geoffrey
|
Back to top
|
|
 |
technosaurus

Joined: 18 May 2008 Posts: 4785 Location: Kingwood, TX
|
Posted: Sat 14 May 2011, 00:44 Post subject:
|
|
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 github repositories. I may eventually get around to updating my blogspot.
|
Back to top
|
|
 |
amigo
Joined: 02 Apr 2007 Posts: 2641
|
Posted: Sat 14 May 2011, 04:56 Post subject:
|
|
You can get the original GTK1 version here:
http://distro.ibiblio.org/pub/linux/distributions/amigolinux/download/Applications/Search/turma-0.1/
|
Back to top
|
|
 |
muggins
Joined: 20 Jan 2006 Posts: 6747 Location: hobart
|
Posted: Sat 14 May 2011, 08:46 Post subject:
|
|
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.
|
Back to top
|
|
 |
seaside
Joined: 11 Apr 2007 Posts: 917
|
Posted: Sun 15 May 2011, 13:30 Post subject:
|
|
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 Quote: | 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 |
That must be a real long one-liner
Regards,
s
|
Back to top
|
|
 |
technosaurus

Joined: 18 May 2008 Posts: 4785 Location: Kingwood, TX
|
Posted: Mon 16 May 2011, 10:17 Post subject:
|
|
seaside wrote: | That must be a real long one-liner |
not realy, here is a simplified version in script form
Code: | #!/bin/sh
find . -iname \*$3 -exec sed -i "s/"$1"/"$2"/g" {} ';' -print |
$1 is what you want to replace
$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 github repositories. I may eventually get around to updating my blogspot.
|
Back to top
|
|
 |
seaside
Joined: 11 Apr 2007 Posts: 917
|
Posted: Mon 16 May 2011, 18:15 Post subject:
|
|
technosaurus wrote: |
find . -iname \*$3 -exec sed -i "s/"$1"/"$2"/g" {} ';' -print[/code]
|
technosaurus,
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
|
Back to top
|
|
 |
technosaurus

Joined: 18 May 2008 Posts: 4785 Location: Kingwood, TX
|
Posted: Mon 16 May 2011, 21:38 Post subject:
|
|
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 github repositories. I may eventually get around to updating my blogspot.
|
Back to top
|
|
 |
seaside
Joined: 11 Apr 2007 Posts: 917
|
Posted: Tue 17 May 2011, 20:32 Post subject:
|
|
Here's a limited protype that just needs a front end.
Code: | #!/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
|
This is probably better in Gtkdialog- at least you get more buttons there.
Cheers,
s
|
Back to top
|
|
 |
Pelo
Joined: 10 Sep 2011 Posts: 12591 Location: Mer méditerrannée (1 kms°)
|
Posted: Sun 16 Nov 2014, 00:37 Post subject:
Turma does the job (Lucid Diamonds) |
|
Turma does the job (Lucid Diamonds)
_________________ Passenger Pelo ! don't ask him to repair the aircraft. Don't use him as a demining dog .... pleeease.
|
Back to top
|
|
 |
Pelo
Joined: 10 Sep 2011 Posts: 12591 Location: Mer méditerrannée (1 kms°)
|
Posted: Tue 01 Dec 2015, 05:20 Post subject:
Turma as it is is useful |
|
Moi Turma me va. Turma as it is is useful
.avi list all my videos, even more files.
_________________ Passenger Pelo ! don't ask him to repair the aircraft. Don't use him as a demining dog .... pleeease.
|
Back to top
|
|
 |
|