Sponsored Content
Full Discussion: CSV file comparison
Top Forums Shell Programming and Scripting CSV file comparison Post 302532272 by Corona688 on Monday 20th of June 2011 11:44:32 AM
Old 06-20-2011
Are they in the same order? Will they ever have different numbers of lines? A simple solution for line-matching might just be:

diff a.csv b.csv | grep '^> ' | sed 's/> //' > diff-file
This User Gave Thanks to Corona688 For This Post:
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Need help on comparison of two csv files

Dear All, I want to compare two csv files using shell programming - File 1 contents 44,,NONE,0,,2/2/1901 66,,NONE,0,,2/3/1901 File 2 Contents 1022,3708268,AUFX,0,100919,3/1/2006 66,,NONE,0,,2/3/1901 After comparing each column/field I want to print the occurances of... (5 Replies)
Discussion started by: sourav1982
5 Replies

2. 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

3. Shell Programming and Scripting

csv 4 columns values comparison!

Hi all, i have a csv file which as the following data: 294;F03;2000;40441 294;F03;2000;40443 284;F01;5400;44051 284;F01;5700;45666 the file holds 11689 lines. I was trying to get a script running to output results from this file that for each line with the condition: if a line is found... (9 Replies)
Discussion started by: stryng
9 Replies

4. Shell Programming and Scripting

csv file comparison with normal file

i will like to give my files as fileB : 02.09.2011:MOU04/KUBIS--R_Lieferung_1/KUBIS_V15.0/vpn_wls_15-0-0b01 02.09.2011:MOU04/KUBIS--R_Lieferung_2/KUBIS_V15.0/apng_wls_15-0-0b02 31 02.09.2011:MOU04/KUBIS--R_Lieferung_2/KUBIS_V15.0/ecc_wls_15-0-0b02 32 ... (2 Replies)
Discussion started by: rajniman
2 Replies

5. 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

6. Shell Programming and Scripting

Match columns from two csv files and update field in one of the csv file

Hi, I have a file of csv data, which looks like this: file1: 1AA,LGV_PONCEY_LES_ATHEE,1,\N,1,00020460E1,0,\N,\N,\N,\N,2,00.22335321,0.00466628 2BB,LES_POUGES_ASF,\N,200,200,00006298G1,0,\N,\N,\N,\N,1,00.30887539,0.00050312... (10 Replies)
Discussion started by: djoseph
10 Replies

7. 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

8. Shell Programming and Scripting

Save output of updated csv file as csv file itself

Hi, all I want to sort a csv file based on timestamp from oldest to newest and save the output as csv file itself. Here is an example of my csv file. test.csv SourceFile,DateTimeOriginal /home/intannf/foto/IMG_0739.JPG,2015:02:17 11:32:21 /home/intannf/foto/IMG_0749.JPG,2015:02:17 11:37:28... (10 Replies)
Discussion started by: refrain
10 Replies

9. Shell Programming and Scripting

Save output of updated csv file as csv file itself, part 2

Hi, I have another problem. I want to sort another csv file by the first field. result.csv SourceFile,Airspeed,GPSLatitude,GPSLongitude,Temperature,Pressure,Altitude,Roll,Pitch,Yaw /home/intannf/foto5/2015_0313_090651_219.JPG,0.,-7.77223,110.37310,30.75,996.46,148.75,180.94,182.00,63.92 ... (2 Replies)
Discussion started by: refrain
2 Replies
MONGOEXPORT(1)							  Mongo Database						    MONGOEXPORT(1)

NAME
mongoexport - the Mongo export tool SYNOPSIS
mongoexport [OPTIONS] DESCRIPTION
mongoexport is a tool to export a MongoDB collection to either JSON or CSV. The query can be filtered or a list of fields to output can be given. If the output is CSV, the fields must be specified in order. EXAMPLES
mongoexport -d test -c test1 --csv -f name,num export documents from test.test1 in CSV format OPTIONS
--help show usage information -h, --host HOST server to connect to (default HOST=localhost) -d, --db DATABASE database to use -c, --c COLLECTION collection to use -q, --query QUERY query filter -f, --fields FIELDS comma-separated list of field names --csv export to CSV instead of JSON -o, --out FILE output file, if not specified, stdout is used --dbpath PATH directly access mongod data files in this path, instead of connecting to a mongod instance COPYRIGHT
Copyright 2007-2009 10gen SEE ALSO
For more information, please refer to the MongoDB wiki, available at http://www.mongodb.org. AUTHOR
Kristina Chodorow 10gen June 2009 MONGOEXPORT(1)
All times are GMT -4. The time now is 06:09 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy