08-05-2008
Join csv
Hi .. as written I tried to implement the logic.....I could successfully do the concatenation....but my file "final_2" is blank.....
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I am trying to place all my data in a single row (order doesn't matter). Note I am a Unix novice, so please go easy on me.
Here is an example
Raw data:
row#
(1) 45 64 23
(2) 32 1 6 56
(3) 32 45
Needs to be like this:
row#
(1) 45
(2) 32
(3) 32 ... (2 Replies)
Discussion started by: mmann1123
2 Replies
2. Shell Programming and Scripting
Hi,
I have different files of the same type, as:
Time:
100
snr:
88
perf:
10
other:
222
Each of these files are created periodically.
What I need to do is to merge all of them into one but having the following form: (2 Replies)
Discussion started by: Ravendark
2 Replies
3. UNIX for Dummies Questions & Answers
Hi there!
I have the following problem:
I have a set of files called rates_op_yyyyddmm with the format below (which corresponds to the file rates_op_20090130)
30-JAN-2009,ED,FEB09,C,96.375,,,0,,,,,,2.375,,,,,,
30-JAN-2009,ED,FEB09,C,96.5,,,0,,,,,,2.25,,,,,,... (2 Replies)
Discussion started by: Pep Puigvert
2 Replies
4. Shell Programming and Scripting
I have about 20 CSV's that all look like this:
"","","","","","","","","","","","","","","",""What I've been told I need to produce is the exact same thing, but with each file now containing the start_code from every other file where the email matches.
It doesn't matter if any of the other... (1 Reply)
Discussion started by: Demosthenes
1 Replies
5. Shell Programming and Scripting
I have 48 csv files in my directory that all have this form:
Storm Speed (mph),43.0410781151
Storm motion direction (degrees),261.580774982
MLCAPE,2450.54098661
MLCIN,-9.85040520279
MLLCL,230
MLLFC,1070.39871
MLEL,207.194689294
MLCT,Not enough data
Sbcape,2203.97617778... (3 Replies)
Discussion started by: RissaR
3 Replies
6. Shell Programming and Scripting
Hi,
I have two very large CSV files, which I want to merge (equi-join) based on a key (column).
One of the file (say F1) would have ~30 MM records and 700 columns. The other file (~f2) would have same # of records and lesser columns (say 50). I want to create an output file joining on a... (3 Replies)
Discussion started by: student_007
3 Replies
7. Shell Programming and Scripting
Hi,
I have following 2 CSV files
file1.txt
A1,B1,C1,D1,E1
A2,B2,C2,D2,E2
A3,B3,C3,D3,E3
....
file2.txt
A1,B1,P1,Q1,R1,S1,T1,U1
A1,B1,P2,Q2,R2,S2,T2,U2
A1,B1,P3,Q3,R3,S3,T3,U3
A2,B2,X1,Y1,Z1,I1,J1,K1
A2,B2,X2,Y2,Z2,I2,J2,K2
A2,B2,X3,Y3,Z3,I3,J3,K3
A2,B2,X4,Y4,Z4,I4,J4,K4... (2 Replies)
Discussion started by: learnoutmore99
2 Replies
8. Shell Programming and Scripting
I have the urge to merge some files using unix shell script but I'm very new using this language and I haven't succeeded yet.
The requirement is to merge the header, body and footer into one file with the name "ANY-NAME" in below example. To identify which files should be merged, I have flagged... (9 Replies)
Discussion started by: black_soul
9 Replies
9. Shell Programming and Scripting
Hi Experts,
Need urgent solution for a problem.
I have two files file1 and file2. file1 is tab separated and file2 is comma separated.
I need to merge both the files into single file based on CUST_ID by retaining the headers of file1
Matching CUST_IDs should be placed one below the other in... (11 Replies)
Discussion started by: bharathbangalor
11 Replies
10. Shell Programming and Scripting
Hi experts,
I have a csv file which has one field (ID) repeated multiple times with corresponding other field values.
I need to convert this file in a format where for a ID all other values has to be present in single field.
For Eg : Here in below file ID 1 is repeated 3 times with different... (7 Replies)
Discussion started by: bharathbangalor
7 Replies
LEARN ABOUT DEBIAN
log::log4perl::filter::boolean
Filter::Boolean(3pm) User Contributed Perl Documentation Filter::Boolean(3pm)
NAME
Log::Log4perl::Filter::Boolean - Special filter to combine the results of others
SYNOPSIS
log4perl.logger = WARN, AppWarn, AppError
log4perl.filter.Match1 = sub { /let this through/ }
log4perl.filter.Match2 = sub { /and that, too/ }
log4perl.filter.MyBoolean = Log::Log4perl::Filter::Boolean
log4perl.filter.MyBoolean.logic = Match1 || Match2
log4perl.appender.Screen = Log::Dispatch::Screen
log4perl.appender.Screen.Filter = MyBoolean
log4perl.appender.Screen.layout = Log::Log4perl::Layout::SimpleLayout
DESCRIPTION
Sometimes, it's useful to combine the output of various filters to arrive at a log/no log decision. While Log4j, Log4perl's mother ship,
chose to implement this feature as a filter chain, similar to Linux' IP chains, Log4perl tries a different approach.
Typically, filter results will not need to be passed along in chains but combined in a programmatic manner using boolean logic. "Log if
this filter says 'yes' and that filter says 'no'" is a fairly common requirement but hard to implement as a chain.
"Log::Log4perl::Filter::Boolean" is a special predefined custom filter for Log4perl which combines the results of other custom filters in
arbitrary ways, using boolean expressions:
log4perl.logger = WARN, AppWarn, AppError
log4perl.filter.Match1 = sub { /let this through/ }
log4perl.filter.Match2 = sub { /and that, too/ }
log4perl.filter.MyBoolean = Log::Log4perl::Filter::Boolean
log4perl.filter.MyBoolean.logic = Match1 || Match2
log4perl.appender.Screen = Log::Dispatch::Screen
log4perl.appender.Screen.Filter = MyBoolean
log4perl.appender.Screen.layout = Log::Log4perl::Layout::SimpleLayout
"Log::Log4perl::Filter::Boolean"'s boolean expressions allow for combining different appenders by name using AND (&& or &), OR (|| or |)
and NOT (!) as logical expressions. Parentheses are used for grouping. Precedence follows standard Perl. Here's a bunch of examples:
Match1 && !Match2 # Match1 and not Match2
!(Match1 || Match2) # Neither Match1 nor Match2
(Match1 && Match2) || Match3 # Both Match1 and Match2 or Match3
SEE ALSO
Log::Log4perl::Filter, Log::Log4perl::Filter::LevelMatch, Log::Log4perl::Filter::LevelRange, Log::Log4perl::Filter::StringRange
COPYRIGHT AND LICENSE
Copyright 2002-2009 by Mike Schilli <m@perlmeister.com> and Kevin Goess <cpan@goess.org>.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
perl v5.10.1 2010-07-21 Filter::Boolean(3pm)