Hi All,
I am new to unix Shell scripting
Actually i need to write a shell script to insert data from a dat file to ms-Excel file
The data in the dat file will be like this
Col1 Col2 Col3 Col4
and and
Col5
I a new... (1 Reply)
Hi
I need to do some thing like "find and insert before that " in a file which contains many records. This will be clear with the following example.
The original data record should be some thing like this
60119827 RTMS_LOCATION_CDR INSTANT_POSITION_QUERY 1236574686123083rtmssrv7 ... (8 Replies)
Can anyone help.
I have sql to CSV showing header with ALIAS names but I want to generate CSV file with user friendly name i.e from AIAN8 to Adress Book Number etc.
SELECT AIAN8 || , || F0101.ABALPH || , || AICO ||
showing following below in CSV output intead of above
Address... (4 Replies)
So, I have a massive file with thousands of columns
I want a list of the headers in one column in another file.
So I need to strip off the top line (can use head-1)
But how can I convert from this format:
A B C D E F G
to
A
B
C
D
E
F
G (6 Replies)
Here is the csv file file i have:
ServerName, IPAddress, Gateway, Notes
ServerA, 192.168.1.100, 192.168.1.1, This is some server
ServerB, 192.168.1.110, 192.168.1.1, This is some other server
ServerC, 192.168.1.120, 192.168.1.1, This is some other other server
I would like to have the... (6 Replies)
Friends,
I need help with the following in UNIX.
Merge all csv files in one folder considering only 1 header row and ignoring header of all other files.
FYI - All files are in same format and contains same headers.
Thank you (4 Replies)
Hi,
I have an input like this
1 2 3 4
2 3 4 5
4 5 6 7
I would like to count the no. of columns and print a header with a prefix "Col".
I would also like to count the no. of rows and print as first column with each line number with a prefix "Row"
So, my output would be
... (2 Replies)
Hi,
So I am trying to print the first row(header) first column alongwith the matched value. But I am not sure how do I print the same, by matching a pattern located in the file
eg
File contents
Name Place
Jim NY
Jill NJ
Cathy CA
Sam TX
Daniel FL
And what I want is... (2 Replies)
I am just trying to insert the word "Index" using awk. The below is close but seems to add the word at the end and I can not get the syntax correct to add from the beginning. Thank you :).
awk -F'\t' -v OFS='\t' '{ $-1=$-1 OFS "Index"}$1=$1' file
current output
Chr Start End ... (3 Replies)
How to insert header with underline
AM able to insert only header not underline
sed '1i NAME COUNTRY' test.txt
input file
UK 1234
USA 2354
AUS 2253
IND 4256
Output file
NAME COUNTRY_CODE
---- ------------
UK 1234
USA 2354
AUS 2253
IND 4256 (5 Replies)
Discussion started by: Kalia
5 Replies
LEARN ABOUT DEBIAN
lire::reportparser::rowcolhandler
RowColHandler(3pm) LogReport's Lire Documentation RowColHandler(3pm)NAME
Lire::ReportParser::RowColHandler - Lire::ReportParser subclass which synthetize row
SYNOPSIS
In XML Report processors:
package MyParser;
use base qw/Lire::ReportParser::RowColHandler/;
sub handle_header_row {
my ( $self, $row ) = @_;
...
}
sub handle_row {
my ( $self, $row ) = @_;
...
}
sub handle_table_summary {
my ( $self, $nrecords, $row ) = @_;
....
}
DESCRIPTION
The Lire::ReportParser::RowColHandler module is a Lire::ReportParser subclass which will synthetize handle_row() events. This makes it
easier to write subclases which onlypurpose is to format the report. Instead of having to reconstruct the table row from the various
entry_start, group_start, handle_name, events, the subclass only has to process handle_row() events.
USING Lire::ReportParser::RowColHandler
Client only have to inherit from Lire::ReportParser::RowColHandler. After that, they can define handle_row(), handle_header_row() and
handle_table_summary() method.
There is a parameter that the RowColHandler accepts and its "summary_when" which specify when the handle_table_summary() event will be
synthetised ( "before" or "after" the table's body.) When it's "before" the event will be generated after the header_row events but before
any handle_row() events. Otherwise, it will be generated once all handle_row() events are processed. The default is "before".
handle_table_summary( $nrecords, $row )
Called after the table summary is available (and depending on the "summary_when" initialisation parameter). $nrecords contains the number
of records used to compute the report and $row is an array reference to the table summary value. The $row array contains as much elements
as there is columns in the table. Only the numerical column will have a value in there, others will be set to undef.
The summary value are hash reference containing the same values than is available in the Lire::ReportParser's handle_summary_value() event.
handle_header_row( $row )
This will called once for each header row there is. The first header row contains all the numerical columns as well as the main categorical
column.
$row is an array reference containing as much element as there is columns in the table. Column's labels which shouldn't appear on this row
are undef. Other elements will contain the related Lire::Report::ColumnInfo object.
handle_row( $row )
This event will be called for each row to display in the table.
$row is an array reference containing the data that should appear in the row. It contains as many elements as there are columns defined in
the table. Empty column will have undef as content. Other elements will be an hash reference identical to what would be received in the
handle_name() or handle_value() method of Lire::ReportParser. The only difference is that summary value will have a key "is_summary" set to
1.
In the case of spanning columns, the data element will be in the col_start() element. The other cells will be undef.
SEE ALSO Lire::ReportParser(3pm)Lire::Report::ColumnInfo(3pm)VERSION
$Id: RowColHandler.pm,v 1.13 2006/07/23 13:16:31 vanbaal Exp $
COPYRIGHT
Copyright (C) 2002 Stichting LogReport Foundation LogReport@LogReport.org
This file is part of Lire.
Lire is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free
Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program (see COPYING); if not, check with
http://www.gnu.org/copyleft/gpl.html.
AUTHOR
Francis J. Lacoste <flacoste@logreport.org>
Lire 2.1.1 2006-07-23 RowColHandler(3pm)