Sponsored Content
Top Forums UNIX for Beginners Questions & Answers How to add fields to different file? Post 303030630 by kivale on Wednesday 13th of February 2019 03:55:03 AM
Old 02-13-2019
dear R. Singh

thankyou for the reply

i try this but the result not like expectation.
this is the result

Code:
3,"""a,"e23","f"

 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to add fields in a file

Hi all! I have two files containing one field each. The fields consist of numbers separated in records e.g. file1.dat 1657 2345 5678 5676 7978 7856 5686 5676 8990 . . . (2 Replies)
Discussion started by: bjorb
2 Replies

2. Shell Programming and Scripting

How do I strip and add tabbed fields to a long text file?

I was wondering if there was a way to modify a tab delimited text file, up to 185,000 lines long by adding a repeated field to a block of 20 data , then repeat the process until the file is processed. The current file looks like: ... (3 Replies)
Discussion started by: saint65
3 Replies

3. Shell Programming and Scripting

Get 4 character each from 2 different fields concatenate and add as a new field

Hi, I have a huge text file. It looks like abcde bangalo country 12345 lastfield i want to get first 3 characters from field1 and first 3 characters from field 2 and insert the result as a new field. example the result should be: abcde bangalo abcban country 12345 lastfield Please... (4 Replies)
Discussion started by: ajithshankar@ho
4 Replies

4. Shell Programming and Scripting

Large pipe delimited file that I need to add CR/LF every n fields

I have a large flat file with variable length fields that are pipe delimited. The file has no new line or CR/LF characters to indicate a new record. I need to parse the file and after some number of fields, I need to insert a CR/LF to start the next record. Input file ... (2 Replies)
Discussion started by: clintrpeterson
2 Replies

5. Shell Programming and Scripting

Add to constant fields at the end of every line

Hi, I want to add two fields with values '1000' and 'XYZ-1234' at the end of every line in a comma delimited file. Should I use any command in a loop to add the fields or using any single command Shall I acheive it? Kindly help me in code. Thanks, Poova. (6 Replies)
Discussion started by: poova
6 Replies

6. Shell Programming and Scripting

How to add up fields

Hi everyone, after entering the following command: /usr/sfw/bin/snmpwalk -v2c -c "sMart5snmPaCC3ss" ABI0-QCLAMI-CE2 1.3.6.1.4.1.9.9.43.1.1.6.1.7 I get this output: SNMPv2-SMI::enterprises.9.9.43.1.1.6.1.7.24 = INTEGER: 194 SNMPv2-SMI::enterprises.9.9.43.1.1.6.1.7.25 = INTEGER: 194... (4 Replies)
Discussion started by: omoyne
4 Replies

7. Shell Programming and Scripting

Add fields in different files only if some fields between them match

Hi everybody (first time posting here) I have a file1 that looks like > 1,101,0.1,0.1 1,26,0.1,0.1 1,3,0.1,0.1 1,97,0.5,0.5 1,98,8.1,0.218919 1,99,6.2,0.248 2,101,0.1,0.1 2,24,3.1,0.147619 2,25,23.5,0.559524 2,26,34,0.723404with 762 lines.. I have another 'similar' file2 > ... (10 Replies)
Discussion started by: murpholinox
10 Replies

8. Shell Programming and Scripting

awk to extract multiple values from file and add two additional fields

In the attached file I am trying to use awk to extract multiple values and create the tab-delimited desired output. In the output R_Index is a the sequential # and Pre_Enrichment is defaulted to .. I can extract from the values to the side of the keywords, but most are above and I can not... (2 Replies)
Discussion started by: cmccabe
2 Replies

9. UNIX for Beginners Questions & Answers

How to add number of fields throughout file together?

So, I have three problems that cover this subject. First one asks me to find the number of fields in the file that contain the substring "he". I found the number of fields, but the problem I have is that they are displaying by each record. I want to add all of the records' fields together. With... (2 Replies)
Discussion started by: mc10
2 Replies
Plucene::Index::FieldInfos(3pm) 			User Contributed Perl Documentation			   Plucene::Index::FieldInfos(3pm)

NAME
Plucene::Index::FieldInfos - a collection of FieldInfo objects SYNOPSIS
my $fis = Plucene::Index::FieldInfos->new($dir_name); my $fis = Plucene::Index::FieldInfos->new($dir_name, $file); $fis->add(Plucene::Document $doc, $indexed); $fis->add(Plucene::Index::FieldInfos $other_fis, $indexed); $fis->add($name, $indexed); $fis->write($path); my @fields = $fis->fields; my $field_number = $fis->field_number($name); my $field_info = $fis->field_info($name); my $field_name = $fis->field_name($number); my $num_fields = $fis->size; DESCRIPTION
This is a collection of field info objects, which happen to live in the field infos file. METHODS
new my $fis = Plucene::Index::FieldInfos->new($dir_name); my $fis = Plucene::Index::FieldInfos->new($dir_name, $file); This will create a new Plucene::Index::FieldInfos object with the passed directory and optional filename. add $fis->add(Plucene::Document $doc, $indexed); $fis->add(Plucene::Index::FieldInfos $other_fis, $indexed); $fis->add($name, $indexed); This will add the fields from a Plucene::Document or a Plucene::Index::FieldsInfos to the field infos file. It is also possible to pass the name of a field and have it added to the file. field_number my $field_number = $fis->field_number($name); This will return the field number of the field with $name. If there is no match, then -1 is returned. fields my @fields = $fis->fields; This will return all the fields. field_info my $field_info = $fis->field_info($name); This will return the field info for the field called $name. field_name my $field_name = $fis->field_name($number); This will return the field name for the field whose number is $number. size my $num_fields = $fis->size; This returns the number of field info objects. write $fis->write($path); This will write the field info objects to $path. perl v5.12.4 2011-08-14 Plucene::Index::FieldInfos(3pm)
All times are GMT -4. The time now is 11:31 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy