Questions tagged [csv]

Comma Separated Values is a tabular to store data

Comma Separated Values is a tabular to store data in plain text. There is no single CSV format, but in general there are 4 principles:

  • are plain text files (basically, this means numeric, graphical, or other values are expressed using printable characters rather than various-sized groups of bits),
  • consists of records (typically one per line),
  • with the records divided into fields that are separated by delimiters (typically a single reserved character such as comma or TAB, or sometimes any sequence of spaces and tabs),
  • where every record includes exactly the same sequence of fields (this is very occasionally violated).

Source: wikipedia

80 questions
3
votes
5 answers

Filter fields with space character from csv file on command line

A csv file with multiple records is delimited by |. field1|field2|field3|field4|field5 I want to check if field3 is blank or contains "space" characters only. If it is blank or space, the whole line should show up.
Michael Ellick Ang
  • 2,039
  • 3
  • 14
  • 15
3
votes
1 answer

CSV engine on MySQL server

I don't think that this is a programming question so I am going to ask it here - Reading the book high performance mysql, I read about the CSV engine. The paragraph says: The CSV engine can treat comma-separated values (CSV) files as table, but…
Jeff
  • 1,089
  • 5
  • 26
  • 46
2
votes
3 answers

reading a csv file in powershell , header line having duplicates

I have a script I am trying to read a csv file with and assign column names to the data. however the files has multiple columns named the same see below Grade QA/QC and Symbol ID,Date,Water Level / Niveau d'eau (m),Grade,Symbol /…
R.Merritt
  • 127
  • 1
  • 3
2
votes
2 answers

Powershell read from CSV set variables

I have a csv file with two columns "Path" and "Owner". I've created the below script and it can read from the CSV file, but when I attempt to assign the variables from the csv it fails. Import-Csv C:\test\output.csv | ForEach-Object { $Path =…
Norrin Rad
  • 353
  • 1
  • 5
  • 14
2
votes
1 answer

MaxMind GeoIP CSV to .dat

I need to put local IP addresses into MaxMind GeoIP DB. I've downloaded the CSV and adding new IP addresses and locations is easy. I've found two tools that do csv to dat for MaxMind GeoIP but I can't get them work. With python script: ./csv2dat.py…
yax
  • 31
  • 1
  • 4
2
votes
2 answers

Powershell Scripts works for 10 months, suddenly stops working

When I create my new users every week, I execute this powershell scripts I put together. It has been working like a charm for 10 months, but as of last week started throwing this strange error: Invoke-Command : Cannot bind parameter 'Name' to the…
2
votes
2 answers

Powershell script to Inventory File Types

I have been writing a script to inventory drives by specific file types. (AVI, MPG, MP3, etc....) I can get the base script to work using only a set drive and extension, but I would really like to have it read extensions from a file, and drives…
Keith
  • 23
  • 4
2
votes
2 answers

Importing users to AD with CSV, cannot get some fields to work

Been trying to build a CSV file to import users into Active Directory. I can get everything to populate, except for E-mail, Password, and Enabling the user. Just using this cmdlet in Powershell. Import-CSV…
Matt Fogleman
  • 95
  • 1
  • 8
2
votes
1 answer

Handler mapping on IIS / OWIN /Nancy for a CSV file

I've an issue with IIS and OWIN/Nancy, here is the setup of our server : Windows Server 2012 R2 IIS 8.5 OWIN with Nancy (middleware) ASP.NET 4.5 Application developed in F#. I want to download a .csv file with an URL like this…
Denis
  • 23
  • 3
2
votes
3 answers

Batch script to export info from Active Directory (name, phone numbers, location, etc) into a csv file

The secretary at my work uses a spreadsheet that lists names, phone numbers, and locations of employees to look up info if someone asks. All this info is located in AD, but the problem is that we are a rapidly growing company, and people change…
James F
  • 21
  • 1
  • 1
  • 2
2
votes
2 answers

Server 2012: how to plan for storage failover?

The Stuff I have the following components to work with: two rooms two beefy Dell R510s, one in each room two EMC VNXe storage devices, one in each room. The goal Ensure that if one server room goes down, VMs can continue to come back up &…
SeanKilleen
  • 1,083
  • 8
  • 25
  • 38
2
votes
3 answers

How to export munin raw data to CSV?

I'm monitoring my Debian GNU/Linux server with Munin monitoring software. I was wondering whether I could export the raw data used to generate Munin charts? I want to do some in-depth statistical analysis for example on outgoing traffic. CSV or some…
q9f
  • 640
  • 3
  • 10
  • 21
2
votes
2 answers

Display nth instance of grepped pattern

So here's my problem. I have an issue with a .csv file (Current.csv) in that there are commas randomly place throughout the data, so awk-ing the file doesn't give me constant column numbers for a particular type of information I'm looking for. …
user121351
2
votes
5 answers

Counting number of items in a single-row CSV file?

I have a file containing a long comma-delimited list of numbers, like this: 2,8,42,75,101 What's the simplest command (from a Unix shell) to get the count of numbers in this file? In the example above, that would be 5.
An̲̳̳drew
  • 1,265
  • 2
  • 14
  • 19
2
votes
2 answers

Best way to filter output by date range

I need to filter a row of a csv file by a date. The file is structured as so: test121smith@example.com active 01/24/11 10:04 07/23/23 16:56 test121johnson@example.com …
dj423
  • 23
  • 3