12-06-2010
How to make a CSV file from a Raw data
Hi
Please help me on this.i have the Following data
i want to make it CSV file by a Unix Shell Script.
•msgType : 234
( m_code : 0 # m_name : type # m_data : LOG )
[ MyIP-CAN-Type,{ ( m_code : 0 # m_name : MyIP-CAN-Type # m_data : 0 ) }]
pls help me on this
10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
Hello all,
I'm new here, so this information may exist elsewhere on this forum. If so, please point me in the right direction.
Here's the problem.
I'm trying to migrate Oracle data from an HP system to a Sun system using a raw device as a 'bridge' between the two systems. Both machines... (4 Replies)
Discussion started by: Neville
4 Replies
2. Shell Programming and Scripting
Dear All,
I have some data file.see below.
--------------ALARM CLEARING FROM SubNetwork=ONRM_RootMo,SubNetwork=AXE,ManagedElement=CGSN--------------
Alarm Record ID: 25196304
Event Time: 2006-08-28 13:41:35
Event Type: ... (1 Reply)
Discussion started by: Nayanajith
1 Replies
3. Shell Programming and Scripting
I have a data file like this.
SDPINPUTCDR.SDPCallDetailRecord.chargeEventCDR
{
cdrID : "egmailcom0w10ggzx00"
teleServiceCode : 'sMS (5)'
chargedPartyNumber : "716323770"
otherPartyNumber : "een@gmail.com"
time : "084127"
date : "20070319"
duration : "0"
extensionInt1 : '4'D
}... (3 Replies)
Discussion started by: Nayanajith
3 Replies
4. Shell Programming and Scripting
Dear all,
I want below data to make it in column format.so i will see the data like this
cdrID teleServiceCode chargedPartyNumber ... ... ... ...
"egmailcom0w10ggzx00" 'sMS (5)' "716323770"
"m17ifi5z30w0z6o7200" 'sMS (5)' ... (7 Replies)
Discussion started by: Nayanajith
7 Replies
5. Shell Programming and Scripting
Hello everybody,
Here is my problem, I don't know anything about shell programming and my boss is actually asking me to develop a shell script in order to get values in a csv file from a specific date.
Here is a sample of the csv file :
Date;Enchaînement;Titre;Libellé ;calendrier;Heure début;Heure... (11 Replies)
Discussion started by: freyr
11 Replies
6. Shell Programming and Scripting
Hi All :)
Need help to create a csv file from some data which is extracted from input file
Input file:
1. RUN DATE: 06/02/11 2. SYSTEM: EP0Z 3. PROBLEM TYPE: 0016
-------- ---- ----
4. JOB NUMBER: 4301 5. JOB NAME:... (4 Replies)
Discussion started by: atul9806
4 Replies
7. UNIX for Dummies Questions & Answers
Hi All,
i have a requirement where i need to format the input RAW file ( which is CSV) by using another mapping file(also CSV file). basically i am getting feed file with dynamic headers by using mapping file (in that target field is mapped with source filed) i have to convert the raw file into... (6 Replies)
Discussion started by: ravi4informatic
6 Replies
8. Shell Programming and Scripting
Hi, I am newbie in shell script.
I need your help to solve my problem.
Firstly, I have 2 files of csv and i want to compare of the contents then the output will be written in a new csv file.
File1:
SourceFile,DateTimeOriginal
/home/intannf/foto/IMG_0713.JPG,2015:02:17 11:14:07... (8 Replies)
Discussion started by: refrain
8 Replies
9. Shell Programming and Scripting
I have input data looks like this which is a part of a csv file
7,1265,76548,"0102:04"
8,1266,76545,"0112:04"
I need to make the output data should look like this and the output data will be part of text file:
7|1265000 |7654899 |A|
8|12660000 |76545999 |B|
The logic behind the... (6 Replies)
Discussion started by: RJG
6 Replies
10. Shell Programming and Scripting
Hello,
im trying to make csv file from a text file that it is the output of pssh command
(multiple ssh )
now if i run the command date on all of our servers:
i get this output :
14:02:46 192.168.25.230:22
Thu Jul 6 14:02:46 EEST 2017
192.168.70.230: Thu Jul 6 12:02:46 BST 2017
... (1 Reply)
Discussion started by: batchenr
1 Replies
LEARN ABOUT DEBIAN
text::csv::encoded::coder::base
Text::CSV::Encoded::Coder::Base(3pm) User Contributed Perl Documentation Text::CSV::Encoded::Coder::Base(3pm)
NAME
Text::CSV::Encoded::Coder::Base - Interface for Text::CSV::Encoded coder base class
SYNOPSIS
package Text::CSV::Encoded::Coder::YourCoder;
use base qw( Text::CSV::Encoded::Coder::Base );
sub decode {
...
}
sub encode {
...
}
sub upgrade {
...
}
sub decode_fields_ref {
...
}
sub encode_fields_ref {
...
}
DESCRIPTION
This module is used by Text::CSV::Encoded internally.
INTERFACS
decode
( $self, $encoding, $str ) = @_;
....
return $decoded_str;
Takes an encoding and a CSV string. It must return a Perl string decoded in $encoding. In Perl 5.8 or later, if $enc is "undef" or false,
the encoding should be utf8.
encode
( $self, $encoding, $str ) = @_;
....
return $encoded_str;
Takes an encoding and a Perl string. It must return a CSV string encoded in $encoding. In Perl 5.8 or later, if $enc is "undef" or false,
the encoding should be utf8.
decode_fields_ref
( $self, $encoding, $arrayref ) = @_;
Takes an encoding and an array reference. It must decoded each array entries in $encoding.
encode_fields_ref
( $self, $encoding, $arrayref ) = @_;
Takes an encoding and an array reference. It must encoded each array entries in $encoding.
upgrade
( $self, $str ) = @_;
In Perl 5.8 or later, it is expected to do "utf8::upgrade" against $str. In older versions, this method may be meaningless and there is no
need to implement. See to utf8.
encode_check_value
Setter/Getter for an argument passing to encode.
$coder->encode_check_value( Encode::FB_PERLQQ );
decode_check_value
Setter/Getter for an argument passing to decode.
$coder->encode_check_value( Encode::FB_PERLQQ );
EXAMPLE
Use with Jcode.
package Text::CSV::Encoded::Coder::Jcode;
use strict;
use base qw( Text::CSV::Encoded::Coder::Base );
use Jcode ();
my $Jcode = Jcode->new;
my %alias = (
'shiftjis' => 'sjis',
'euc-jp' => 'euc',
'sjis' => 'sjis',
'euc' => 'euc',
);
sub decode {
my ( $self, $encoding, $str ) = @_;
my $enc = $alias{ $encoding };
$Jcode->set( $str, $enc )->euc;
}
sub encode {
my ( $self, $encoding, $str ) = @_;
my $enc = $alias{ $encoding };
$Jcode->set( $str, 'euc' )->$enc();
}
sub decode_fields_ref {
my ( $self, $encoding, $arrayref ) = @_;
my $enc = $alias{ $encoding };
for ( @$arrayref ) {
$_ = $Jcode->set( $_, $enc )->euc;
}
}
sub encode_fields_ref {
my ( $self, $encoding, $arrayref ) = @_;
my $enc = $alias{ $encoding };
for ( @$arrayref ) {
$_ = $Jcode->set( $_, 'euc' )->$enc();
}
}
AUTHOR
Makamaka Hannyaharamitu, <makamaka[at]cpan.org>
COPYRIGHT AND LICENSE
Copyright 2008-2010 by Makamaka Hannyaharamitu
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
perl v5.14.2 2010-04-26 Text::CSV::Encoded::Coder::Base(3pm)