Sponsored Content
Full Discussion: Compare 2 csv files
Top Forums Shell Programming and Scripting Compare 2 csv files Post 303019843 by Scott on Sunday 8th of July 2018 02:44:08 PM
Old 07-08-2018
It's not remotely clear to me how you get the "expected" output. Did you perhaps forget to include the "input" for that, and a description of how that's to be handled, that would add some context and meaning to the question? Also showing what you've done (code) to get that expected output would be good.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Compare 2 csv files in perl

need to compare 2 csv files and report should containg number of matching lines,different lines ,missing lines in one file using perl. I dont want to use read line by line and scan thru the second file for matching line ,as this logic was so time consuming .Any ideas.i need the soultion badly .... (2 Replies)
Discussion started by: kittu1979
2 Replies

2. UNIX for Dummies Questions & Answers

How to compare csv files using perl

I need to compare 2 csv files and report should containg number of matching lines,different lines ,missing lines in one file using perl. I dont want to use read line by line and scan thru the second file for matching line ,as this logic was so time consuming .Can other ideas .please respond asap... (2 Replies)
Discussion started by: kittu1979
2 Replies

3. Shell Programming and Scripting

Need to compare two csv files values and write into another csv file

Hi all, Am new to scripting. So i just need your ideas to help me out. Here goes my requirement. I have two csv files 1.csv 2.csv abc,1.24 abc,1 def,2.13 def,1 I need to compare the first column of 1.csv with 2.csv and if matches then need to compare... (2 Replies)
Discussion started by: chinnahyd
2 Replies

4. Shell Programming and Scripting

Need to compare values on two CSV files

:( Hello, Having a problem with reading two files using awk/nawk, am new to both them. I need to compare field values between two csv files and arrange for an appropriate output if both the values are equal or not for each feild. $cat File1.csv... (4 Replies)
Discussion started by: pgop
4 Replies

5. Shell Programming and Scripting

Help with script to open and compare csv files

We are testing an application that accesses two tables: A and B. I am to write a script to validate the ouput files of this application.The application marks any account that has become overdue as per rule. When it runs, it updates the overdue flag in the A table according to the following rules: ... (1 Reply)
Discussion started by: inkyponky
1 Replies

6. Shell Programming and Scripting

Need Perl script to compare two CSV files

Need perl script to compare the two CSV files and and give out put in CSV format File MsPMTP.csv File ProfileNames.csv MsPMTP.csv is having lines like below JBL_VIJ_A_A962/r01sr4sl12/port#01-#13-Au4P-4c-TMi-PMNETR15 JBL_VIJ_A_A962/r01sr4sl12/port#01-#13-Au4P-4c-TMi-PMFETR15... (9 Replies)
Discussion started by: sreedhargouda
9 Replies

7. Shell Programming and Scripting

How to compare the columns in two .csv files?

Hi I have to compare two .csv files which having 4 columns and i am expecting the output if there is difference in the 3,4columns in two files with respect to the first column. if my statement is not clear please refer the example. Input: ----- File 1 : hostname MAC SWITCH_IP SWITCH_PORT... (7 Replies)
Discussion started by: Kanchana
7 Replies

8. Shell Programming and Scripting

Compare 2 csv files in ksh and o/p the difference in a new csv file

(say) I have 2 csv files - file1.csv & file2.csv as mentioned below: file1.csv ID,version,cost 1000,1,30 2000,2,40 3000,3,50 4000,4,60 file2.csv ID,version,cost 1000,1,30 2000,2,45 3000,4,55 6000,5,70 The... (7 Replies)
Discussion started by: Naresh101
7 Replies

9. Shell Programming and Scripting

Compare 2 files of csv file and match column data and create a new csv file of them

Hi, I am newbie in shell script. I need your help to solve my problem. Firstly, I have 2 files of csv and i want to compare of the contents then the output will be written in a new csv file. File1: SourceFile,DateTimeOriginal /home/intannf/foto/IMG_0713.JPG,2015:02:17 11:14:07... (8 Replies)
Discussion started by: refrain
8 Replies

10. Shell Programming and Scripting

Compare and merge two big CSV files

Hi all, i need help. I have two csv files with a huge amount of data. I need the first column of the first file, to be compared with the data of the second, to have at the end a file with the data not present in the second file. Example File1: (only one column) profile_id 57036226... (11 Replies)
Discussion started by: SirMannu
11 Replies
funinfoput(3)							SAORD Documentation						     funinfoput(3)

NAME
FunInfoPut - put information into a Funtools struct SYNOPSIS
#include <funtools.h> int FunInfoPut(Fun fun, int type, char *addr, ...) DESCRIPTION
The FunInfoPut() routine puts information into a Funtools structure. The first argument is the Fun handle from which information is to be retrieved. After this first required argument comes a variable length list of pairs of arguments. Each pair consists of an integer repre- senting the type of information to store and the address of the new information to store in the struct. The variable list is terminated by a 0. The routine returns the number of put actions performed. The full list of available information is described above with the FunInfoPut() routine. Although use of this routine is expected to be uncommon, there is one important situation in which it plays an essential part: writing multiple extensions to a single output file. For input, multiple extensions are handled by calling FunOpen() for each extension to be processed. When opening multiple inputs, it some- times is the case that you will want to process them and then write them (including their header parameters) to a single output file. To accomplish this, you open successive input extensions using FunOpen() and then call FunInfoPut() to set the Funtools reference handle of the output file to that of the newly opened input extension: /* open a new input extension */ ifun=FunOpen(tbuf, "r", NULL)) ) /* make the new extension the reference handle for the output file */ FunInfoPut(ofun, FUN_IFUN, &ifun, 0); Resetting FUN_IFUN has same effect as when a funtools handle is passed as the final argument to FunOpen(). The state of the output file is reset so that a new extension is ready to be written. Thus, the next I/O call on the output extension will output the header, as expected. For example, in a binary table, after resetting FUN_IFUN you can then call FunColumnSelect() to select the columns for output. When you then call FunImagePut() or <A HREF="./library.html#funtablerowput">FunTableRowPut(), a new extension will be written that contains the header parameters from the reference extension. Remember to call FunFlush() to complete output of a given extension. A complete example of this capability is given in the evcol example code. The central algorithm is: o open the output file without a reference handle o loop: open each input extension in turn o set the reference handle for output to the newly opened input extension o read the input rows or image and perform processing o write new rows or image to the output file o flush the output o close input extension o close output file Note that FunFlush() is called after processing each input extension in order to ensure that the proper padding is written to the output file. A call to FunFlush() also ensures that the extension header is written to the output file in the case where there are no rows to output. If you wish to output a new extension without using a Funtools reference handle, you can call FunInfoPut() to reset the FUN_OPS value directly. For a binary table, you would then call FunColumnSelect() to set up the columns for this new extension. /* reset the operations performed on this handle */ int ops=0; FunInfoPut(ofun, FUN_OPS, &ops, 0); FunColumnSelect(fun, sizeof(EvRec), NULL, "MYCOL", "J", "w", FUN_OFFSET(Ev, mycol), NULL); Once the FUN_OPS variable has been reset, the next I/O call on the output extension will output the header, as expected. SEE ALSO
See funtools(7) for a list of Funtools help pages version 1.4.2 January 2, 2008 funinfoput(3)
All times are GMT -4. The time now is 09:41 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy