I used the following script
cd pathname
for y in `ls *`;
do sed "s/ABCD/DCBA/g" $y > temp; mv temp $y;
done
and it worked fine for finding and replacing strings with names etc. in all files of the given path.
I'm trying to replace a string which consists of path (location of file)
... (2 Replies)
I used the following script
cd pathname
for y in `ls *`;
do sed "s/ABCD/DCBA/g" $y > temp; mv temp $y;
done
and it worked fine for finding and replacing strings with names etc. in all files of the given path.
I'm trying to replace a string which consists of path (location of file)
... (11 Replies)
Hi,
filenames:
contains name of list of files to search in.
placelist
contains the names of places to be searched in all files in "filenames"
for i in $(<filenames)
do
egrep -f placelist $i
if ]
then
echo $i
fi
done >> outputfile
Output i am getting: (0 Replies)
find . -type f -name "*.sql" -print|xargs perl -i -pe 's/pattern/replaced/g'
this is simple logic to find and replace in multiple files & folders
Hope this helps.
Thanks
Zaheer (0 Replies)
Hi,
I am new to script and I want find one string from multiple files in diff directories and put that out put to new file.
Like I have A,B & C directories and each has multiple files but one file is unic in all the directories like COMM.txt
Now I want write script to find the string... (8 Replies)
Hello friends,
Plz suggest the find command,
How to search a string in a paticular string in miltiple files with current dirctory.:)
Thanks in advance.
Siva Ranganath Ch (2 Replies)
I'm trying to create what (should be) a simple bash script that will pull computer name and use that info to bind to one of three servers. Is there any way to do this without having a text file with the names of the servers and associated computer names? (5 Replies)
Hey guys. I know pratically 0 about Linux, so could anyone please give me instructions on how to accomplish this ?
The distro is RedHat 4.1.2 and i need to find and replace a multiple lines string in several php files across subdirectories.
So lets say im at root/dir1/dir2/ , when i execute... (12 Replies)
Hello all,
I have a directory with 2000+ files. I need to look in each file for an invoice number. To identify this, i can search for the string 'BIG' and then retrieve the next 30 characters. I was thinking awk for this, but not sure how to do it. Each file contains one long string and in... (8 Replies)
Discussion started by: jdinero
8 Replies
LEARN ABOUT DEBIAN
sagasu
sagasu(1)sagasu(1)NAME
sagasu - GNOME tool to find strings in multiple files
SYNOPSIS
sagasu [string [dir]]
DESCRIPTION
sagasu is a GNOME tool to find strings in a set of files. The user specifies the search directory and the set of files to be searched.
Double-clicking on a search result launches a user command that can for example load the file in an editor at the appropriate line. The
search can recurse into subdirectories and can optionally ignore CVS directories.
Two optional command-line arguments can be given: the first is the initial search string and the second is the directory whose files will
be searched. If only one argument is given, it is taken as the search string. No search is actually started, but the appropriate fields
are initialized. Any subsequent arguments are ignored.
More documentation is available through the application's Help menu.
OPTIONS --help display a help page and exit
--version
display version information and exit
LICENSE
This program is free software; you may redistribute it under the terms of the GNU General Public License. This program has absolutely no
warranty.
AUTHOR
Pierre Sarrazin
See the Sagasu Home Page:
http://sarrazip.com/dev/sagasu.html
BUGS
The files to be searches are still assumed to be in Latin-1, not in UTF-8. The same goes for the command-line arguments and the terminal
to which Sagasu is connected, if applicable.
HISTORY
Sagasu is a Japanese word that means "to search."
June 19th, 2010 sagasu(1)