Hi all, I am taking my first course in unix and having some problems.
I would line to create a scrip that does the following:
1) will tell me the number of users logged in. If a user is logged more than once just count it only ones.
2) want to be able to display the number of users that... (1 Reply)
I have CSV file that contains data in the format as shown below:
ABC, 67, 56, 67, 78, 89, 76, 55
PDR, 85, 83, 83, 72, 82, 89, 83
MPG, 86, 53, 54, 65, 23, 54, 75
..
..
..
..
I want to create a script that will pull out the rows from the above sheet and paste it into another CSV file.... (12 Replies)
I need to take the second column of a .csv file and count the number of instances of each unique value in that same second column. I'd like the output to be value,count sorted by most instances. Thanks for any guidance!
Data example:
317476,317756,0
816063,318861,0
313123,319091,0... (4 Replies)
Hi all,
I have the following input - the unique row key is 1st column
cat file.txt
A response
C request
C response
D request
C request
C response
E request
The desired output should be
C request (7 Replies)
Hello Everyone,
I am trying to find a way to take a .csv file with 7 columns and a ton of rows (over 600,000) and remove the entire row if the cell in forth column is blank.
Just to give you a little background on why I am doing this (just in case there is an easier way), I am pulling... (3 Replies)
Hi Guys,
I need to write a script to compare the count of two csv files each having 5 columns.
Everyday a csv file is recived.
Now we need to compare the count of todays csv file with yesterday's csv file and if the total count of records is same in todays csv file and yesterday csv file out... (3 Replies)
I do have a tab delimited file of the following format:
431 kat1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
432 kat2 2 NA NA NA NA NA NA NA NA NA NA NA NA NA
433 KATe NA 3 NA NA 6 NA NA NA 10 11 NA NA NA NA
542 Kaed 2 NA NA NA NA NA NA NA NA NA NA NA NA NA
543 hkwuy NA NA NA NA 6 NA NA NA NA 11 NA NA... (11 Replies)
Hi,
I need a solaris shell script to read multiple files and count number of unique name rows(strings) from those files. The input and output should be like this
Input:
file 1
abc
cde
abc ... (9 Replies)
Hi,
Very good wishes to all!
Please help to provide the shell script for generating the record counts in filed wise from the .csv file
My question:
Source file:
Field1 Field2 Field3
abc 12f sLm
1234 hjd 12d
Hyd 34
Chn
My target file should generate the .csv file with the... (14 Replies)
Hi All ,
I have multiple pipe delimited csv files are present in a directory.I need to find out distinct count on a column on those files and need the total distinct
count on all files.
We can't merge all the files here as file size are huge in millions.I have tried in below way for each... (9 Replies)
Discussion started by: STCET22
9 Replies
LEARN ABOUT DEBIAN
tm::serializable::csv
TM::Serializable::CSV(3pm) User Contributed Perl Documentation TM::Serializable::CSV(3pm)NAME
TM::Serializable::CSV - Topic Maps, trait for parsing (and later dumping) CSV stream
SYNOPSIS
# 1) bare bones
my $tm = .....; # get a map from somewhere (can be empty)
Class::Trait->apply ($tm, "TM::Serializable::CSV");
use Perl6::Slurp;
$tm->deserialize (slurp 'myugly.csv');
# 2) exploiting the timed sync in/out mechanism
my $tm = new TM::.... (url => 'file:myugly.csv'); # get a RESOURCEABLE map from somewhere
$tm->sync_in;
DESCRIPTION
This trait provides parsing and dumping from CSV formatted text streams.
INTERFACE
Methods
deserialize
$tm->deserialize ($text)
This method consumes the text string passed in and interprets it as CSV formatted information. What topic map information is generated,
depends on the header line (the first line):
o If the header line contains a field called "association-type", then all rows will be interpreted as assertions. In that the
remaining header fields (in that order) are interpreted as roles (role types). For all rows in the CSV stream, the position where
the "association-type" field was is ignored. The other fields (in that order) are affiliated with the corresponding roles.
Example:
association-type,location,bio-unit
is-born,gold-coast,rumsti
is-born,vienna,ramsti
Scoping cannot be controlled. Also all players and roles (obviously) are directly interpreted as identifiers. Subject identifiers
and locators are not (yet) implemented.
o If the header line contains a field called "id", then all further rows will be interpreted as topic characteristics, with each
topic on one line. The column position where the "id" field in the header is will be interpreted as toplet identifier.
All further columns will be interpreted according to the following:
o If the header column is named "name", the values will be used as topic names.
o Otherwise if the value looks like a URI, an occurrence with that URI value will be be added to the topic.
o Otherwise an occurrence with a string value will be added to the topic.
Example:
name,id,location,homepage
"Rumsti",rumsti,gold-coast,http://rumsti.com
"Ramsti",ramsti,vienna,http://ramsti.com
serialize
$tm->serialize
[Since TM 1.53] This method serializes a fragment of a topic map into CSV. Which fragment can be controlled with the header line and
options (see constructor).
"header_line" (only for serialization)
This string contains a comma separated list (CSV parseable) of headings. If one of the headings is "association-type", then the
generated CSV content will contain associations only. Nothing else is implemented yet. The other headings control which roles (and
in which order) should be included in the CSV content. If a particular role type has more than one player, then all players are
included.
NOTE: As this is inconsistent, this will have to change.
"type" (only for serialization)
If existing, then this controls which association type is to be taken.
"baseuri" (only for serialization)
If existing and non-zero, the base URI of the map will remain in the identifiers. Otherwise it will be removed.
"specification"
If existing (and when selecting only associations), this specification will be interpreted in the sense of "asserts" (see TM).
Example:
$tm->serialize (header_line => 'association-type,location,bio-unit',
type => 'is-born',
baseuri => 0);
SEE ALSO
TM, TM::Serializable
AUTHOR INFORMATION
Copyright 2010 Robert Barta.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
http://www.perl.com/perl/misc/Artistic.html
perl v5.10.1 2012-06-05 TM::Serializable::CSV(3pm)