Sponsored Content
Top Forums Shell Programming and Scripting awk + gsub to search multiple input values & replace with located string + extra text Post 302592681 by dazhoop on Tuesday 24th of January 2012 01:12:27 PM
Old 01-24-2012
awk + gsub to search multiple input values & replace with located string + extra text

Thanks ahamed101, simple as that huh! Works perfectly.

Mod - will ensure to follow correct posting procedure next time around.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

awk search & delete located criteria

Guys, I manages to get awk to search and print the files that I want to delete. However I am stuck on the delete portion. Here is the command that I am using to fins these files. find /usr/local/apache/conf/vhosts/ -type f | awk '/e$/' The output is perfect. The files look like so: ... (4 Replies)
Discussion started by: jaysunn
4 Replies

2. Shell Programming and Scripting

Search & Replace in Multiple Files by reading a input file

Hi, I have a folder which contains multiple config.xml files and one input file, Please see the below format. Config Files format looks like :- Code: <application name="SAMPLE-ARCHIVE"> <NVPairs name="Global Variables"> <NameValuePair> ... (0 Replies)
Discussion started by: haiksuresh
0 Replies

3. Shell Programming and Scripting

Search for multiple string and replace with respective values

Hi, Can anyone help me to search for multiple strings within specified position and replace with respective string value. For example I need to search the string from the position 11 to 20 and if it contain ABC and then replace it by BCDEFGHIJ ... find AABZSDJIK and replace with QWE. and... (4 Replies)
Discussion started by: zooby
4 Replies

4. Shell Programming and Scripting

Search & replace content using awk/gsub

Hi, I have two files master.txt & reference.txt. Sample below Master.txt 2372,MTS,AP 919848001104,Airtel,DL 0819,MTS,MUM 919849788001,Airtel,AP 1430,Aircel MP,20 Reference.txt 2372,919848701430,46467 919848002372,2372,47195 2372,919849788001,59027 0819,028803,1 0819,029801,1... (2 Replies)
Discussion started by: siramitsharma
2 Replies

5. Shell Programming and Scripting

Search & Replace content of files using gsub in awk

Hi,I have 2 files master.txt & reference.txt as shown below & i require o/p as mentioned in file 3 using awk but content is not replacing properlymaster.txt:... (15 Replies)
Discussion started by: siramitsharma
15 Replies

6. Shell Programming and Scripting

Search & Replace in Multiple Files by reading a input file

I have a environment property file which contains: Input file: value1 = url1 value2 = url2 value3 = url3 and so on. I need to search all *.xml files under directory for value1 and replace it with url1. Same thing I have to do for all values mentioned in input file. I need script in unix bash... (7 Replies)
Discussion started by: Shamkamde
7 Replies

7. Shell Programming and Scripting

Replace characters in string with awk gsub

Hi I have a source file that looks like a,b,c,d,e,f,g,h,t,DISTI(USD),MSRP(USD),DIST(EUR),MSRP(EUR),EMEA-DISTI(USD),EMEA-MSRP(USD),GLOBAl-DISTI(USD),GLOBAL-MSRP(USD),DISTI(GBP), MSRP(GBP) I want to basically change MSRP(USD) to MSRP,USD and DIST(EUR) to DIST,EUR and likewise for all i'm using... (3 Replies)
Discussion started by: r_t_1601
3 Replies

8. Shell Programming and Scripting

Read record from the text file contain multiple separated values & assign those values to variables

I have a file containing multiple values, some of them are pipe separated which are to be read as separate values and some of them are single value all are these need to store in variables. I need to read this file which is an input to my script Config.txt file name, first path, second... (7 Replies)
Discussion started by: ketanraut
7 Replies

9. UNIX for Beginners Questions & Answers

awk GSUB read field values from multiple text files

My program run without error. The problem I am having. The program isn't outputting field values with the column headers to file.txt. Each of the column headers in file.txt has no data. MEMSIZE SECOND SASFoundation Filename The output results in file.txt should show: ... (1 Reply)
Discussion started by: dellanicholson
1 Replies

10. Shell Programming and Scripting

awk gsub command to replace multiple spaces

Hi Forum. I'm trying to cleanup the following data elements (To remove any occurences of commas and any extra spaces) while preserving the <TAB> delimiter using awk gsub but I have not been successful. Original Data: 4365 monte des source rue,, ,<TAB>trevost<TAB>QC Desired Data:... (1 Reply)
Discussion started by: pchang
1 Replies
Mail::SPF::Mod::Redirect(3)				User Contributed Perl Documentation			       Mail::SPF::Mod::Redirect(3)

NAME
Mail::SPF::Mod::Redirect - SPF record "redirect" modifier class DESCRIPTION
An object of class Mail::SPF::Mod::Redirect represents an SPF record modifier of type "redirect". Constructors The following constructors are provided: new(%options): returns Mail::SPF::Mod::Redirect Creates a new SPF record "redirect" modifier object. %options is a list of key/value pairs representing any of the following options: domain_spec See "new" in Mail::SPF::Mod. new_from_string($text, %options): returns Mail::SPF::Mod::Redirect; throws Mail::SPF::ENothingToParse, Mail::SPF::EInvalidMod Creates a new SPF record "redirect" modifier object by parsing the string and any options given. Class methods The following class methods are provided: name: returns string Returns 'redirect'. name_pattern: returns Regexp Returns a regular expression that matches a modifier name of 'redirect'. precedence: returns real Returns a precedence value of 0.8. See "precedence" in Mail::SPF::Mod. Instance methods The following instance methods are provided: params See "params" in Mail::SPF::Mod. domain_spec: returns Mail::SPF::MacroString Returns the "domain-spec" parameter of the modifier. process($server, $request, $result): throws Mail::SPF::Result If no mechanism matched during the evaluation of the current SPF record, performs a recursive SPF check using the given SPF server and request objects and substituting the modifier's target domain name for the request's authority domain. The result of the recursive SPF check is then thrown as the result of the current record's evaluation. However, if the target domain has no acceptable SPF record, a "permerror" result is thrown. See RFC 4408, 6.1, for details. See Mail::SPF::Mod for other supported instance methods. SEE ALSO
Mail::SPF, Mail::SPF::Mod, Mail::SPF::Term, Mail::SPF::Record <http://tools.ietf.org/html/rfc4408> For availability, support, and license information, see the README file included with Mail::SPF. AUTHORS
Julian Mehnle <julian@mehnle.net>, Shevek <cpan@anarres.org> perl v5.18.2 2017-10-06 Mail::SPF::Mod::Redirect(3)
All times are GMT -4. The time now is 01:48 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy