Sponsored Content
Full Discussion: awk help - delimited file
Top Forums Shell Programming and Scripting awk help - delimited file Post 302467420 by cabrao on Friday 29th of October 2010 09:51:48 AM
Old 10-29-2010
Code:
$ awk -F\| '{gsub("a","\\&",$1);gsub("b","#",$7)}1' file
Record 1 : &c& bbb ccc ddd eee aaa ##7
Record 2 : &c& xyz xyz ddd eee aaa ##7

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Converting Tab delimited file to Comma delimited file in Unix

Hi, Can anyone let me know on how to convert a Tab delimited file to Comma delimited file in Unix Thanks!! (22 Replies)
Discussion started by: charan81
22 Replies

2. Shell Programming and Scripting

splitting tab-delimited file with awk

Hi all, I need help to split a tab-delimited list into separate files by the filename-field. The list is already sorted ascendingly by filename, an example list would look like this; filename001 word1 word2 filename001 word3 word4 filename002 word1 word2 filename002 word3 word4... (4 Replies)
Discussion started by: perkele
4 Replies

3. Shell Programming and Scripting

Awk search for string pattern in delimited file

I've got a semicolon delimited file. I would like to search for fields that match a pattern, and not hardcoded eg "mth". *th=something If the delimited field fulfills this condition, eg. mth=value I would like to print out both key and value for some number comparison. eg. if value > "12"... (5 Replies)
Discussion started by: alienated
5 Replies

4. Shell Programming and Scripting

using awk to substitute data in a column delimited text file

using awk to substitute data in a column delimited text file hello i would like to use awk to do the following calculation from the following snippet. input file C;2390 ;CV BOUILLOTTE 2L 2FACES NERVUREES ;1.00 ;3552612239004;13417 ;25 ;50 ; 12;50000 ; ; ... (3 Replies)
Discussion started by: iindie
3 Replies

5. Shell Programming and Scripting

How to convert a space delimited file into a pipe delimited file using shellscript?

Hi All, I have space delimited file similar to the one as shown below.. I need to convert it as a pipe delimited, the values inside the pipe delimited file should be as highlighted... AA ATIU2345098809 009697 005374 BB ATIU2345097809 005445 006518 CC ATIU9685098809 003215 003571 DD... (7 Replies)
Discussion started by: nithins007
7 Replies

6. Shell Programming and Scripting

Awk print all columns in delimited file

text file example 1,222222222222,333,444444444444444 111111111,22,33333333,444 desired output 1 222222222222 333 444444444444444 111111111 22 33333333 444I have a delimeted file which I want to print in a table like format. The... (10 Replies)
Discussion started by: Calypso
10 Replies

7. Shell Programming and Scripting

awk read one delimited file, search another delimited file

Hello folks, I have another doozy. I have two files. The first file has four fields in it. These four fields map to different locations in my second file. What I want to do is read the master file (file 2 - 23 fields) and compare each line against each record in file 1. If I get a match in all four... (4 Replies)
Discussion started by: dagamier
4 Replies

8. UNIX for Dummies Questions & Answers

What awk 1-liner will replace value in 1stField of a delimited file with the value of '5' ?

Hi, I am a newbie to awk. Here is my problem. Looking for an awk 1-liner to solve it: My Computing Environment: - Solaris10 - I prefer to use csh or sh shells 1. Lets say my input file is File1.dat (delimter = | ) and looks as follows: (File1.dat) ... (1 Reply)
Discussion started by: andy b
1 Replies

9. UNIX for Beginners Questions & Answers

awk to parse current and next row in tab-delimited file

Hi there, I would like to use awk to reformat a tab-delimited file containing three columns as follows: Data file: sample 1 173 sample 269 530 sample 687 733 sample 1699 1779 Desired output file: sample 174..265, 531..686, 734..1698 I need the value... (5 Replies)
Discussion started by: emiley
5 Replies

10. UNIX for Beginners Questions & Answers

awk command to split pipe delimited file

Hello, I need to split a pipe de-limited file based on the COLUMN 7 value . If the column value changes I need to split the file Source File Payment|ID|DATE|TIME|CONTROLNUMBER|NUMBER|NAME|INDICATOR 42156974|1137937|10/1/2018|104440|4232|2054391|CARE|1... (9 Replies)
Discussion started by: rosebud123
9 Replies
Mail::SPF::v1::Record(3)				User Contributed Perl Documentation				  Mail::SPF::v1::Record(3)

NAME
Mail::SPF::v1::Record - SPFv1 record class SYNOPSIS
See Mail::SPF::Record. DESCRIPTION
An object of class Mail::SPF::v1::Record represents an SPFv1 ("v=spf1") record. Constructors The following constructors are provided: new(%options): returns Mail::SPF::v1::Record Creates a new SPFv1 record object. %options is a list of key/value pairs representing any of the following options: text terms global_mods See "new" in Mail::SPF::Record. scopes See "new" in Mail::SPF::Record. Since SPFv1 records always implicitly cover the "helo" and "mfrom" scopes, this option must either be exactly ['helo', 'mfrom'] (or ['mfrom', 'helo']) or be omitted. new_from_string($text, %options): returns Mail::SPF::v1::Record; throws Mail::SPF::ENothingToParse, Mail::SPF::EInvalidRecordVersion, Mail::SPF::ESyntaxError Creates a new SPFv1 record object by parsing the string and any options given. Class methods The following class methods are provided: version_tag_pattern: returns Regexp Returns a regular expression that matches a version tag of 'v=spf1'. default_qualifier results_by_qualifier See "Class methods" in Mail::SPF::Record. Instance methods The following instance methods are provided: text scopes terms global_mods global_mod stringify eval See "Instance methods" in Mail::SPF::Record. version_tag: returns string Returns 'v=spf1'. SEE ALSO
Mail::SPF, Mail::SPF::Record, Mail::SPF::Term, Mail::SPF::Mech, Mail::SPF::Mod <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::v1::Record(3)
All times are GMT -4. The time now is 09:12 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy