Questions tagged [csv]
Files containing data arrange in a table, often with commas (hence Comma Separated Values), to separate columns. Rows are separated by newlines (but not all newlines are row separators as fields can be quoted to contain the separator newlines. Use this tag for full-fledged CSV data not the simpler case of one record per line or completely unquoted (use csv-simple for that kind of data).
948 questions
1 vote
4 answers
134 views
try to split csv with multiple headers
I have a csv from a solar inverter and I need to input the data into a SQL database. The problem I have is that two inverters are in the same csv, so I need to split the csv into two or "do ...
-1 votes
6 answers
188 views
How to count blank fields from a delimited file in Unix
from script below: EmpID:Name:Designation:UnitName:Location:DateofJoining:Salary 1001:Thomson:SE:IVS:Mumbai:10-Feb-1999:60000 1002:Johnson:TE::Bangalore:18-Jun-2000:50000 1003:Jackson:DM:IMS:Hyderabad:...
5 votes
5 answers
611 views
Unix shell scripting help- how to replace file delimiter if exist inside double quotes data of a delimited csv file?
My input file data: "Per Sara Porras.|, LLC"|column2_data|column3_data column1_data|"column2|data"|"column3|data" Required output: "Per Sara Porras.@@@, LLC"|...
3 votes
2 answers
691 views
How to extract lines by condition from large CSV?
I have a CSV file with 100 million rows, approximately 60GB in size. Now, I want to create another CSV from it but only take lines that match a certain condition: at the end of the CSV, there is an ...
3 votes
3 answers
368 views
Large file manipulation
I have a Garmin Nuvi which uses OpenStreet maps. Garmin do postcodes, but is usually 2-3 years out of date for Scotland. OSM does not do British postcodes, but the Post office does, and it can be ...
0 votes
5 answers
1k views
command-line tool to sum the values in a column of a CSV file
I am looking for a command-line tool to calculate the sum of the values in a specified column of a CSV file. (Update: The CSV file might have quoted fields, so a simple solution just to break on a ...
3 votes
5 answers
266 views
How to remove double quotes within the double-quoted field values in .dat file
I have a text file that has around 15 columns. The fields are separated by comma. One column that is description is double-quoted and also has some words which are double-quoted. I need to retain ...
1 vote
1 answer
114 views
Add list of urls to the Qutebrowser’s sqlite3 history
General overview I have a `history.csv CSV file of urls formated like this: <url>;<title>;2024-03-30T12:00:00;2024-03-30T12:00:00 (The 2024-03-30T12:00:00 is the same) The goal is to get ...