10-21-2011
My input n number of csv files as below.
File1.csv
Header row
data row1
data row11
data row11
....
File2.csv
Header row
data row2
data row22
data row222
....
etc
Filen.csv
Header row
data rown
data rownn
data rownnn
....
My OUTPUT File Should look like
FinalFile
Header row
data row1
data row11
data row11
data row2
data row22
data row222
.....
data rown
data rownn
...
Thanks
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hello,
I am building an .xls file extracting info from a DB to be eventually emailed. All is good except how do I put in a header row.. like date, name of report etc. before the columns with the actual column name and data?
Thanks for any assistance.. the below is after I have signed into... (11 Replies)
Discussion started by: Tish
11 Replies
2. Linux
say i have these many file in a directory named exam.
1)/exam/newfolder/link.txt.
2)/exam/newfolder1/
and i create a tar say exam.tar
well the problem is,
when i read the tar file i dont find any metadata about the directories,as you cannot create a tar containig empty directories.
on the... (2 Replies)
Discussion started by: Tanvirk
2 Replies
3. Shell Programming and Scripting
Situation:
Our system currently executes a job (COBOL Program) that generates an interface file to be sent to one of our vendors. Because this system processes information for over 100,000 employees/retirees (and growing), we'd like to multi-thread the job into processing-groups in order to... (4 Replies)
Discussion started by: oordonez
4 Replies
4. UNIX for Dummies Questions & Answers
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)
Discussion started by: polly_falconer
6 Replies
5. Shell Programming and Scripting
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)
Discussion started by: Ikon
6 Replies
6. UNIX for Dummies Questions & Answers
Hi All,
I am trying to merge all files in a directory that end in *.txt to a single file with the contents one after the other. This I can do using the cat function but how do I put the name of the file as a header for each one in the combined single file and seperate the contents from each... (2 Replies)
Discussion started by: pcg
2 Replies
7. Shell Programming and Scripting
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)
Discussion started by: jacobs.smith
2 Replies
8. Shell Programming and Scripting
i have a file in the gz format , the content of the file is as follow.
gzcat f1.gz
# 1.name
# 2.location
# 3.age
# 4.dob
.
.
.
.
.
.
.
.
.
# 43.hobbies
< Aravind,33,chennai,09091980, , , , , , , surfing> (5 Replies)
Discussion started by: aravindj80
5 Replies
9. Shell Programming and Scripting
Hi all,
Say i have multiple files x1 x2 x3 x4, all with common header (date, time, year, age),,
How can I merge them to one singe file "X" in shell scripting
Thanks for your suggestions. (2 Replies)
Discussion started by: msarguru
2 Replies
10. Shell Programming and Scripting
I've been struggling with this one for quite a while and cannot seem to find a solution for this find/replace scenario. Perhaps I'm getting rusty.
I have a file that contains a number of metrics (exactly 3 fields per line) from a few appliances that are collected in parallel. To identify the... (3 Replies)
Discussion started by: verdepollo
3 Replies
LEARN ABOUT DEBIAN
tk::tablematrix::spreadsheethiderows
TableMatrix::SpreadsheetHideRows(3pm) perl/Tk Documentation TableMatrix::SpreadsheetHideRows(3pm)
NAME
Tk::TableMatrix::SpreadsheetHideRows - Table Display with selectable hide/un-hide of rows
SYNOPSIS
use Tk;
use Tk::TableMatrix::SpreadsheetHideRows
my $t = $top->Scrolled('SpreadsheetHideRows',
-selectorCol => 3,
-expandData => $hashRef,
-rows => 21, -cols => 11,
-width => 6, -height => 6,
-titlerows => 1, -titlecols => 1,
-variable => $arrayVar,
-selectmode => 'extended',
-resizeborders => 'both',
-titlerows => 1,
-titlecols => 1,
-bg => 'white',
);
DESCRIPTION
Tk::TableMatrix::SpreadsheetHideRows is a Tk::TableMatrix::Spreadsheet-derived widget that implements a Spreadsheet-like display of tabular
information, where some of the rows in the table can be expanded/hidden by clicking a '+/-' selector in the row. This can be used to
display top-level information in a table, while allowing the user to expand certain table rows to view detail-level information.
See demos/SpreadsheetHideRows in the source distribution for a simple example of this widget
Widget-specific Options
In addition the standard Tk::TableMatrix widget options. The following options are implemented:
-selectorCol
Column number where the +/- selector will appear. Clicking on the +/- selector will expand/hide the detail information in the table for a
particular row.
-selectorColWidth
Width of the column used to display the +/- selector. Defaults to 2
-expandData
Hash ref defining the detail-level data displayed when a row is expanded (by clicking the +/- selector). This hash ref should have the
following structure:
$expandData = {
row1 => { tag => 'detailDataTag',
data => $detailData,
spans=> $spanData,
expandData => $subLevelData
},
row2 => {
.
.
}
Where:
row1, row2, ... Row numbers that will be expandable.
tag => 'detailDataTag' Tag name that will be applied to the detail data.
(optional)
$detailData 2D Array of detail-data to be displayed when
the row is expanded.
e.g. [ [ r1c1, r1c2, r1c3 ],
[ r2c1, r2c2, r2,c3] ]
$spans 1D array of span information (optional) to be
used for display of the detail information.
e.g. [ col2 => "rows,cols", col4 => "rows,cols", ... ]
$subLevelData Optional Recursive expandData used to hold detail-data of detail-data.
MEMBER DATA
The following items are stored as member data
defaultCursor
Name of the mouse cursor pointer that is used for normal (i.e. non-title, non-indicator) cells in the widget. This is set to the value of
the $widget->cget(-cursor) option when the widget is created.
indRowCols
Hash ref of Row/Cols indexes where there are indicators stores. This is a quick lookup hash built from _expandData.
_expandData
Internal version of the expandData hash. Any sub-detail data (i.e. expand data that is at lower levels of expandData) that is visible is
placed at the top level of this hash, for keeping track of the visible expandData.
Widget Methods
In addition the standard Tk::TableMatrix widget method. The following methods are implemented:
showDetail
Shows (i.e. expands the table) the detail data for a given row. This method is called when a user clicks on an indicator that is not
already expanded.
Usage:
$widget->showDetail($row);
# Shows the detail data for row number $row
hideDetail
Hides the detail data for a given row. This method is called when a user clicks on an indicator that is already expanded.
Usage:
$widget->hideDetail($row);
# Hides the detail data for row number $row
Tk1.23 2007-01-09 TableMatrix::SpreadsheetHideRows(3pm)