Sponsored Content
Full Discussion: How to parse csv format?
Top Forums Shell Programming and Scripting How to parse csv format? Post 302435723 by drl on Thursday 8th of July 2010 05:28:19 AM
Old 07-08-2010
Hi.

The module Text::CSV is available in a Debian repository.

Many people like to to use the package manager to install items. With apt-get using the environment:
Code:
OS, ker|rel, machine: Linux, 2.6.26-2-amd64, x86_64
Distribution        : Debian GNU/Linux 5.0

here's a simulated install:
Code:
$  apt-get -s install libtext-csv-perl
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  libtext-csv-xs-perl
The following NEW packages will be installed:
  libtext-csv-perl libtext-csv-xs-perl
( ... )
Inst libtext-csv-perl (1.06-1 Debian:5.0.5/stable)
Inst libtext-csv-xs-perl (0.52-1 Debian:5.0.5/stable)
Conf libtext-csv-perl (1.06-1 Debian:5.0.5/stable)
Conf libtext-csv-xs-perl (0.52-1 Debian:5.0.5/stable)

Best wishes ... cheers, drl
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

How to Parse a CSV file into a Different Format

Hi I have a CSV file with me in this format Currency, USD, EUR, USD, 1.00, 1.32, EUR, 0.66, 1.00, How do I transpose the file to get to the format below. currency, currency, rate USD, USD, 1.00 USD, EUR, 1.32 EUR, USD, 0.66 EUR, EUR, 1.00 Thanks for your help We are using... (2 Replies)
Discussion started by: cdesiks
2 Replies

2. Shell Programming and Scripting

CSV File parse help in Perl

Folks, I have a bit of an issue trying to obtain some data from a csv file using PERL. I can sort the file and remove any duplicates leaving only 4 or 5 rows containing data. My problem is that the data contained in the original file contains a lot more columns and when I try ro run this script... (13 Replies)
Discussion started by: lodey
13 Replies

3. Shell Programming and Scripting

Unix Script to parse a CSV

I am writing a unix script that will parse a CSV and edit the values. My CSV looks like this 0,0,0,0,1,0,1,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0 10,11,7,0,4,12,2,3,7,0,11,3,12,4,0,5,5,4,5,0,8,6,12,0,9,3,3,0,2,7,8... (16 Replies)
Discussion started by: RJ17
16 Replies

4. Shell Programming and Scripting

Parse XML file into CSV with shell?

Hi, It's been a few years since college when I did stuff like this all the time. Can someone help me figure out how to best tackle this problem? I need to parse a file full of entries that look like this: <eq action="A" sectyType="0" symbol="PGR" exch="CA" curr="VEF" sess="NORM"... (7 Replies)
Discussion started by: Pcushing
7 Replies

5. Shell Programming and Scripting

Parse csv file

Hi, Our requirement is to parse the input file(.csv format). The each column in the file is delimited with comma. We need to take each column and apply some business validation rule. If data itself contains comma, then those fields are enclosed with double quotes ("). We can see this double... (7 Replies)
Discussion started by: vfrg
7 Replies

6. Shell Programming and Scripting

Retaining the Unix CSV format in Excel format while exporting

Hi All, I have created a Unix Shell script whch creates a *.csv file and export it to Excel. The problem i am facing is that Users wants one of the AMOUNT field in comma separted values. Example : if the Amount has the value as 3000000 User wants to be in 3,000,000 format. This Amount format... (2 Replies)
Discussion started by: rawat_me01
2 Replies

7. Shell Programming and Scripting

how to parse this file and obtain a .csv or .xls

Hello Expert, I have a file in the following format: SYNTAX_VERSION 5 MONITOR "NAME_TEMPLATES" DESCRIPTION "Monitors for contents of error " INTERVAL "1m" MONPROG "script.sh NAME_TEMPLATES" MAXTHRESHOLD GEN_BELOW_RESET SEVERITY Major ... (17 Replies)
Discussion started by: Ant-one
17 Replies

8. Shell Programming and Scripting

Parse csv files by their names

HI all I have multiple csv files with the names VAR1_VAR2_VAR3_VAR4.csv All the files have the same structure inside just values change. I am trying to retrieve data from those files by fixing at each time one or more VAR. I tried to write a script but I have 2 problems: 2-... (1 Reply)
Discussion started by: Jhon.c
1 Replies

9. Shell Programming and Scripting

How to parse this file using awk and output in CSV format?

My source file looks like this: Cust-Number = "101" Cust-Name="Joe" Cust-Town="London" Cust-hobby="tennis" Cust-purchase="200" Cust-Number = "102" Cust-Name="Mary" Cust-Town="Newyork" Cust-hobby="reading" Cust-purchase="125" Now I want to parse this file (leaving out hobby) and... (10 Replies)
Discussion started by: Balav
10 Replies

10. Shell Programming and Scripting

Need a script to parse data and output to csv

I am not too savvy with arrays and am assuming that what I am looking for needs arrays. This is my requirement. So I have the raw data that gets updated to a log as shown below StudentInfo: FullInfo = { Address = Newark Age = 20 Name= John } StudentInfo:... (2 Replies)
Discussion started by: sidnow
2 Replies
JABLICATOR(1)						      General Commands Manual						     JABLICATOR(1)

NAME
jablicator - Share package collection choice across machines SYNOPSIS
jablicator [--root <path>] DESCRIPTION
jablicator generates an "apt-get"-able package. The package itself is empty. However it has a dependency for every non-required Debian package that is on the machine. This program will create and populate two directories dists and pool in your working directory. You can then move them to a web accessible location. This utility is designed to reduce software distribution and maintenance costs by reducing redundant system administration. For example, I have spent a lot of time finding and vetting image processing software from Debian's large package collection. With this utility, my image processing colleague down the hall can easily benefit from the fruit of my labor. There are many replication techniques in Debian. This one has the advantage of using the apt and dpkg infrastructure. A disadvantage is the possibility of packages changing out from under you in the Debian distribution (especially in testing or unstable). That means that jabli- cator output can grow stale over time if it is not regenerated. SECURITY
The packages produced by this program contain a lot of information, including a list of the Debian packages installed on the machine and a listing of apt-get sources. Some system administrators consider sharing such information a security risk. FILES
/etc/apt/sources.list OPTIONS
--root <path> Being able to pull in package selections from another install can be helpful, in the cases of a non-functional system, or reading from a hard drive install under Knoppix. In other words, source from a root filesystem that is not mounted at the root. This is a rare situation and most users should not use this option. SEE ALSO
dpkg(8) apt-get(8). AUTHOR
Jeff Breidenbach <jab@debian.org>. THANKS
Tom Parks, Cliff Weinstein, Burkhard Perkens-Golomb. Debian/GNU Linux September 2001 JABLICATOR(1)
All times are GMT -4. The time now is 09:20 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy