Find Jobs
Hire Freelancers

Compare two CSV files and copy field on match

$30-100 USD

Completed
Posted almost 15 years ago

$30-100 USD

Paid on delivery
I had such a great experience the first time, thought I would try it again. I would like to have a script (PHP or Perl running from Linux Command Line) that will compare two different fields in two different CSV files, and if it finds a match, it will copy a field from the first CSV file and put it in the second CSV file. So if I have a column (selected via script variable or command line option) with ManufacturerID's, the first row has a ABC123 as a manufacturer ID in that field, it will search through a column in the second CSV file (again selected via script variable or command line option) and if it finds a match (cannot be case sensitive, if it finds abc123, it should still match it), it will then copy data from the same row in a second column from the first CSV file to a a column in the second CSV in the matching row(both again selectable as mentioned above). CSV 1: "abc123","Title","Description","0123456789" "abc456","Title","Description","1234567890" "123efg","Title","Description","4982757482" CSV 2: "Title","ABC123","Description","" "Title","abc456",""Description","" "Title","abc789","Description","" First run for example, take abc123 (from column 1) in CSV 1 and search in CSV 2 for it in (in column 2) for it. Since it sees ABC123, it will then take 0123456789 from Column 4 in CSV 1 and put it in Column 4 in CSV 2. Same for abc456 since there is a match. It won't do anything with 123efg as it isn't found in CSV 2. So CSV 2 after it processes should look like this: CSV 2: "Title","ABC123","Description","0123456789" "Title","abc456",""Description","1234567890" "Title","abc789","Description","" As mentioned above, I have different CSV files that put this data in different fields, so I will need to be able to change columns either via command line or variable within the script (at the top) and also the CSV file names. The program can either be in Perl or PHP and has to run from Linux Command Line.
Project ID: 3812673

About the project

39 proposals
Remote project
Active 15 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
Awarded to:
User Avatar
See private message.
$21.25 USD in 5 days
5.0 (10 reviews)
3.6
3.6
39 freelancers are bidding on average $49 USD for this job
User Avatar
See private message.
$38.25 USD in 5 days
5.0 (172 reviews)
9.4
9.4
User Avatar
See private message.
$76.50 USD in 5 days
4.9 (966 reviews)
9.0
9.0
User Avatar
See private message.
$51 USD in 5 days
4.9 (391 reviews)
7.3
7.3
User Avatar
See private message.
$25.50 USD in 5 days
4.9 (186 reviews)
7.0
7.0
User Avatar
See private message.
$85 USD in 5 days
5.0 (106 reviews)
6.5
6.5
User Avatar
See private message.
$29.75 USD in 5 days
4.9 (517 reviews)
6.4
6.4
User Avatar
See private message.
$33.15 USD in 5 days
4.9 (46 reviews)
5.9
5.9
User Avatar
See private message.
$51 USD in 5 days
5.0 (46 reviews)
4.6
4.6
User Avatar
See private message.
$76.50 USD in 5 days
5.0 (8 reviews)
4.8
4.8
User Avatar
See private message.
$7.65 USD in 5 days
4.9 (69 reviews)
4.6
4.6
User Avatar
See private message.
$42.50 USD in 5 days
4.9 (54 reviews)
4.7
4.7
User Avatar
See private message.
$85 USD in 5 days
4.4 (66 reviews)
5.2
5.2
User Avatar
See private message.
$42.50 USD in 5 days
4.9 (47 reviews)
4.6
4.6
User Avatar
See private message.
$42.50 USD in 5 days
5.0 (13 reviews)
4.6
4.6
User Avatar
See private message.
$67.15 USD in 5 days
4.6 (14 reviews)
4.8
4.8
User Avatar
See private message.
$34 USD in 5 days
5.0 (21 reviews)
4.4
4.4
User Avatar
See private message.
$42.50 USD in 5 days
5.0 (25 reviews)
4.5
4.5
User Avatar
See private message.
$85 USD in 5 days
4.8 (20 reviews)
4.4
4.4
User Avatar
See private message.
$34 USD in 5 days
5.0 (3 reviews)
4.0
4.0
User Avatar
See private message.
$21.25 USD in 5 days
4.8 (14 reviews)
3.9
3.9

About the client

Flag of UNITED STATES
De Forest, United States
4.4
5
Member since Apr 11, 2009

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.