06-16-2011
help with columns and rows - script
Hi everyone,
how can I convert a file with 3375 rows and 6 columns to a file with
1350 rows and 15 columns
by using a script?
Is it possible with awk or something like that?
Any help is much appreciated.
Thanks.
D.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi Friends,
I have a log file as below
siteid = HYD
spc = 100
rset = RS_D_M
siteid = DEL
spc = 200
rset = RS_K_L
siteid = DEL2
spc = 210
rset = RS_D_M
Now I need a output like column wise as below.
siteid SPC rset
HYD 100 RS_D_M (2 Replies)
Discussion started by: suresh3566
2 Replies
2. Shell Programming and Scripting
Hi guys I want to print the values by using this script but its giving the no of rows and columns as input instead of values
Would you plz help me on this
FILE- chr1.txt
1981 1
1971 1
1961 1
1941 1
perl script
#!/usr/bin/perl -w
$infile1 = 'chr1.txt';
$outfile3 = 'out3.txt';
... (3 Replies)
Discussion started by: nogu0001
3 Replies
3. Shell Programming and Scripting
This is for an Oracle journal import. I was using a pl/sql package and oracle API's. Oracle added invoker rights to their API's and now my package won't run. I didn't want to use their API's anyway. The only reason i was using pl/sql and the API's (just a package) was to utilize a cursor. How... (2 Replies)
Discussion started by: lmu
2 Replies
4. Shell Programming and Scripting
Hi Everyone,
I have a file text.cvs, which is a file with columns from excel. The data are separeted with semicolon. The content of the file looks like
A B C D E F
1 3 3 4 3 3
2 2 1 2 5 2
5 6 1 1 2 1
Now I wish to write an script which writes the colums A, C and F in... (4 Replies)
Discussion started by: Tob26
4 Replies
5. Shell Programming and Scripting
I have a script which converts rows to columns.
file_name=$1
mailid=$2
#CREATE BACKUP OF ORIGINAL FILE
#cp ${file_name}.xlsx ${file_name}_temp.xlsx
#tr '\t' '|' < ${file_name}_temp.xlsx > ${file_name}_temp.csv
#rm ${file_name}_temp.xlsx
pivot_row=`head -1 ${file_name}`
sed 1d... (3 Replies)
Discussion started by: andy538
3 Replies
6. Shell Programming and Scripting
Hi All
I want to have a Perl script which convert columns to rows.
The Perl should should read the data from input file.
Suppose the input file is
7215484
date to date
173.3
A
1.50
2.23
8.45
10.14
2.00
4.50
2.50
31.32
7216154
month to month (3 Replies)
Discussion started by: parthmittal2007
3 Replies
7. UNIX for Dummies Questions & Answers
I have a dataset with 120 columns. I would like to write a script, that takes the average of every two columns, starting from columns 2 and 3, and moving consecutively in frames of 3 columns, all the way until the last column.
The first column in the output file would be the averages of columns... (1 Reply)
Discussion started by: evelibertine
1 Replies
8. Shell Programming and Scripting
Hi
I have a file having the values like below
----------------------------
.set A
col1=”ABC”
col2=34
col3=”DEF”
col4=”LMN”
col5=25
.set A
.set B
col1=55
col3=”XYZ”
col4=”PQR”
col5=66
.set B
.set C
col2=”NNN” (1 Reply)
Discussion started by: Suneel Mekala
1 Replies
9. Shell Programming and Scripting
Hello, everyone
I am beginner for shell programming. I want to print all lines that have the same values in first two columns
data:
a b 1 2
a a 3 4
b b 5 6
a b 4 6
what I expected is :
a a 3 4
b b 5 6
but I searched for one hour in... (2 Replies)
Discussion started by: nengcheng
2 Replies
10. Shell Programming and Scripting
Hello
I have a large database with the following structure:
Headword=Gloss1;Gloss2;Gloss3
The Glosses are separated by a ;
What I need is to reduce the multiple glosses on each row to columns
Headword=Gloss1
Headword=Gloss2
Headword=Gloss3
I had written the following script in awk... (5 Replies)
Discussion started by: gimley
5 Replies
LEARN ABOUT SUSE
gtk2::table
Gtk2::Table(3) User Contributed Perl Documentation Gtk2::Table(3)
NAME
Gtk2::Table
HIERARCHY
Glib::Object
+----Glib::InitiallyUnowned
+----Gtk2::Object
+----Gtk2::Widget
+----Gtk2::Container
+----Gtk2::Table
INTERFACES
Glib::Object::_Unregistered::AtkImplementorIface
Gtk2::Buildable
METHODS
widget = Gtk2::Table->new ($rows, $columns, $homogeneous=FALSE)
o $rows (integer)
o $columns (integer)
o $homogeneous (boolean)
$table->attach ($child, $left_attach, $right_attach, $top_attach, $bottom_attach, $xoptions, $yoptions, $xpadding, $ypadding)
o $child (Gtk2::Widget)
o $left_attach (integer)
o $right_attach (integer)
o $top_attach (integer)
o $bottom_attach (integer)
o $xoptions (Gtk2::AttachOptions)
o $yoptions (Gtk2::AttachOptions)
o $xpadding (integer)
o $ypadding (integer)
$table->attach_defaults ($widget, $left_attach, $right_attach, $top_attach, $bottom_attach)
o $widget (Gtk2::Widget)
o $left_attach (integer)
o $right_attach (integer)
o $top_attach (integer)
o $bottom_attach (integer)
integer = $table->get_col_spacing ($column)
o $column (integer)
$table->set_col_spacing ($column, $spacing)
o $column (integer)
o $spacing (integer)
$table->set_col_spacings ($spacing)
o $spacing (integer)
integer = $table->get_default_col_spacing
integer = $table->get_default_row_spacing
boolean = $table->get_homogeneous
$table->set_homogeneous ($homogeneous)
o $homogeneous (boolean)
$table->resize ($rows, $columns)
o $rows (integer)
o $columns (integer)
integer = $table->get_row_spacing ($row)
o $row (integer)
$table->set_row_spacing ($row, $spacing)
o $row (integer)
o $spacing (integer)
$table->set_row_spacings ($spacing)
o $spacing (integer)
PROPERTIES
'column-spacing' (Glib::UInt : readable / writable / private)
The amount of space between two consecutive columns
'homogeneous' (boolean : readable / writable / private)
If TRUE, the table cells are all the same width/height
'n-columns' (Glib::UInt : readable / writable / private)
The number of columns in the table
'n-rows' (Glib::UInt : readable / writable / private)
The number of rows in the table
'row-spacing' (Glib::UInt : readable / writable / private)
The amount of space between two consecutive rows
ENUMS AND FLAGS
flags Gtk2::AttachOptions
o 'expand' / 'GTK_EXPAND'
o 'shrink' / 'GTK_SHRINK'
o 'fill' / 'GTK_FILL'
SEE ALSO
Gtk2, Glib::Object, Glib::InitiallyUnowned, Gtk2::Object, Gtk2::Widget, Gtk2::Container
COPYRIGHT
Copyright (C) 2003-2008 by the gtk2-perl team.
This software is licensed under the LGPL. See Gtk2 for a full notice.
perl v5.12.1 2010-07-05 Gtk2::Table(3)