Sponsored Content
Top Forums Shell Programming and Scripting Need Help With Search And Replace Post 302352799 by scheda on Sunday 13th of September 2009 12:17:03 PM
Old 09-13-2009
If by rights, you mean (chmod) permissions, then I don't believe I do at the moment. I can change that though.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

search and replace

hi all, the problem is like this...... i setup a file (Env.txt) which handles all the values. NAME1=xxxxxx, where xxxxx is the value NAME2=xxxxxx GGGGG=uusufu I have 6 files, where i will append the values from env.txt. These files has no specific format. all i want is to append the... (1 Reply)
Discussion started by: tungaw2004
1 Replies

2. Shell Programming and Scripting

Perl: Search for string on line then search and replace text

Hi All, I have a file that I need to be able to find a pattern match on a line, search that line for a text pattern, and replace that text. An example of 4 lines in my file is: 1. MatchText_randomNumberOfText moreData ReplaceMe moreData 2. MatchText_randomNumberOfText moreData moreData... (4 Replies)
Discussion started by: Crypto
4 Replies

3. Shell Programming and Scripting

Search and replace

I have a script which has several occurences of statement like command: $UCMDPATH/xyz abc I would like to replace the entire line starting from $UCMDPATH with the ls -ltr command eg: Prior to change:: command: $UCMDPATH/xyz abc After change: command: ls -ltr Is there a way to do... (12 Replies)
Discussion started by: jobbyjoseph
12 Replies

4. Shell Programming and Scripting

awk - replace number of string length from search and replace for a serialized array

Hello, I really would appreciate some help with a bash script for some string manipulation on an SQL dump: I'd like to be able to rename "sites/WHATEVER/files" to "sites/SOMETHINGELSE/files" within the sql dump. This is quite easy with sed: sed -e... (1 Reply)
Discussion started by: otrotipo
1 Replies

5. Shell Programming and Scripting

Search and Replace

Hi!!! I have following xml file with 3 sections. aaa1bbb-ccc default aaa1bbbdd default 0 11 23 * * aaa2bbb-ccc default aaa2bbbdd default 0 11 23 * * aaa3bbb-ccc default aaa3bbbdd default 0 15 23 * * (15 Replies)
Discussion started by: tdev457
15 Replies

6. Shell Programming and Scripting

perl search and replace - search in first line and replance in 2nd line

Dear All, i want to search particular string and want to replance next line value. following is the test file. search string is tmp,??? ,10:1 "???" may contain any 3 character it should remain the same and next line replace with ,10:50 tmp,123 --- if match tmp,??? then... (3 Replies)
Discussion started by: arvindng
3 Replies

7. UNIX for Dummies Questions & Answers

Search and Replace

I am trying to search and replace using two different files with strict search rules. One file contain some data and the other file contain some numbers as shown below. DataFile.txt >L1_T1 text data... text data.. >L1_T1 text data... text data.. >L1_T1 text data... text data.. ........ (4 Replies)
Discussion started by: Fahmida
4 Replies

8. UNIX for Dummies Questions & Answers

Help with search and replace or search only of / in vi

Hi all, I am editing a config file in vi that has a / on it. At the moment, search and replace looks alright as am able to use a # as a temporary separator, i.e. :,$s#/u01/app#/u02/app#g For doing a search, I have to escape the / do. So if I want to search for /u01/app, I am having to do... (2 Replies)
Discussion started by: newbie_01
2 Replies

9. Shell Programming and Scripting

Vi search and replace

Hi, I need help with search and replace for the following string using vi .. if ];then to if ];then can this be done in one search and replace or need multiple ? Thanks (3 Replies)
Discussion started by: talashil
3 Replies

10. Shell Programming and Scripting

Nested search in a file and replace the inner search

Hi Team, I am new to unix, please help me in this. I have a file named properties. The content of the file is : ##Mobile props east.url=https://qa.east.corp.com/prop/end west.url=https://qa.west.corp.com/prop/end south.url=https://qa.south.corp.com/prop/end... (2 Replies)
Discussion started by: tolearn
2 Replies
SWISH::API::Common(3pm) 				User Contributed Perl Documentation				   SWISH::API::Common(3pm)

NAME
SWISH::API::Common - SWISH Document Indexing Made Easy SYNOPSIS
use SWISH::API::Common; my $swish = SWISH::API::Common->new(); # Index all files in a directory and its subdirectories $swish->index("/usr/local/share/doc"); # After indexing once (it's persistent), fire up as many # queries as you like: # Search documents containing both "swish" and "install" for my $hit ($swish->search("swish AND install")) { print $hit->path(), " "; } DESCRIPTION
"SWISH::API::Common" offers an easy interface to the Swish index engine. While SWISH::API offers a complete API, "SWISH::API::Common" focusses on ease of use. THIS MODULE IS CURRENTLY UNDER DEVELOPMENT. THE API MIGHT CHANGE AT ANY TIME. Currently, "SWISH::API::Common" just allows for indexing documents in a single directory and any of its subdirectories. Also, don't run index() and search() in parallel yet. INSTALLATION
"SWISH::API::Common" requires "SWISH::API" and the swish engine to be installed. Please download the latest release from http://swish-e.org/distribution/swish-e-2.4.3.tar.gz and untar it, type ./configure make make install and then install SWISH::API which is contained in the distribution: cd perl perl Makefile.PL make make install METHODS $sw = SWISH::API::Common->new() Constructor. Takes many options, but the defaults are usually fine. Available options and their defaults: # Where SWISH::API::Common stores index files etc. swish_adm_dir "$ENV{HOME}/.swish-common" # The path to swish-e, relative is OK swish_exe "swish-e" # Swish index file swish_idx_file "$self->{swish_adm_dir}/default.idx" # Swish configuration file swish_cnf_file "$self->{swish_adm_dir}/default.cnf" # SWISH Stemming swish_fuzzy_indexing_mode => "Stemming_en" # Maximum amount of data (in bytes) extracted # from a single file file_len_max 100_000 # Preserve every indexed file's atime atime_preserve $sw->index($dir, ...) Generate a new index of all text documents under directory $dir. One or more directories can be specified. $sw->search("foo AND bar"); Searches the index, using the given search expression. Returns a list hits, which can be asked for their path: # Search documents containing # both "foo" and "bar" for my $hit ($swish->search("foo AND bar")) { print $hit->path(), " "; } index_remove Permanently delete the current index. TODO List * More than one index directory * Remove documents from index * Iterator for search hits LEGALESE
Copyright 2005 by Mike Schilli, all rights reserved. This program is free software, you can redistribute it and/or modify it under the same terms as Perl itself. AUTHOR
2005, Mike Schilli <cpan@perlmeister.com> perl v5.10.0 2008-07-08 SWISH::API::Common(3pm)
All times are GMT -4. The time now is 04:28 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy