08-25-2009
Reddy,
Can You pls. post sample input and output your expecting .
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have learned file comparison from my previous post here. Then, it is comparing the whole line. Now, i have a new problem.
I have two files with 3 columns separated with a "|". What i want to do is to compare the second and third column of file 1, and the second and third column of file 2. And... (4 Replies)
Discussion started by: kingpeejay
4 Replies
2. Shell Programming and Scripting
I am trying to print 1st, 2nd, 13th and 14th fields of a file of line numbers from 29 to 10029. I dont know how to put this in one code. Currently I am removing the selected lines by
awk 'NR==29,NR==10029' File1 > File2
and then doing
awk '{print $1, $2, $13, $14}' File2 > File3
Can... (3 Replies)
Discussion started by: ananyob
3 Replies
3. Shell Programming and Scripting
Hello,
I have the following piece of code:
roleName
=`cat $inputFile | awk -F';' '{ print $1 }'`
roleDescription
=`cat $inputFile | awk -F';' '{ print $2 }'`
roleAuthProfile
=`cat $inputFile | awk -F';' '{ print $3 }'`
mappedUserID (5 Replies)
Discussion started by: pr0tocoldan
5 Replies
4. Shell Programming and Scripting
this works:
cat file.txt| awk 'NR==45,NR==55'
but how do I assign variables instead of numbers:
this does not work:
cat file.txt | awk 'NR==$start,NR==$end'
there need variables instead of numbers
Sorry for my English
Thank you for answer (3 Replies)
Discussion started by: gizmo16
3 Replies
5. Shell Programming and Scripting
hi guys,
i have the following problem: i have a matrix with 3 columns and over 450 rows like this:
0.0165 0.0151 0.0230
0.0143 0.0153 0.0134
0.0135 0.0123 0.0195
0.0173 0.0153 0.0182
i now want to calculate the average of every line and divide every element of this... (1 Reply)
Discussion started by: waddle
1 Replies
6. Shell Programming and Scripting
Is it possible to print max number of 2 columns - awk
note: print max if the integer is positive and print min if the integer is negative
input
a 1 2
b 3 4
c 5 1
d -3 -5
d -5 -3
output
a 2
b 4
c 5
d -5
d -5 (4 Replies)
Discussion started by: quincyjones
4 Replies
7. Shell Programming and Scripting
Greetings!
I have been trying to find out a way to take a CSV file with a large number of rows, and a very large number of columns (in the thousands) and convert the rows to a single column of data, where the first row is a header representing the attribute name and the subsequent series of... (3 Replies)
Discussion started by: tntelle
3 Replies
8. Shell Programming and Scripting
Hi.
How can we print those rows of file2 which are mentioned in file1. first character of file1 is a row number.. for eg
file1
1:abc
3:ghi
6:pqr
file2
a abc
b def
c ghi
d jkl
e mno
f pqr
... (6 Replies)
Discussion started by: Abhiraj Singh
6 Replies
9. Shell Programming and Scripting
Hello,
I have often found bash to be difficult when it comes to floating point numbers. I have data with rows of tab delimited floating point numbers. I need to find the smallest number in each row that is not 0.0. Numbers can be negative and they do not come in any particular order for a given... (9 Replies)
Discussion started by: LMHmedchem
9 Replies
10. Shell Programming and Scripting
I want to split this with every 5 or 50 depend on how much data the file will have. And remove the comma on the end
Source file will have
001,0002,0003,004,005,0006,0007,007A,007B,007C,007E,007F,008A,008C
Need Output from every 5 tab and remove the comma from end of each row
... (4 Replies)
Discussion started by: ranjancom2000
4 Replies
LEARN ABOUT DEBIAN
tk::tablematrix::spreadsheet
TableMatrix::Spreadsheet(3pm) perl/Tk Documentation TableMatrix::Spreadsheet(3pm)
NAME
Tk::TableMatrix::Spreadsheet - Table Display with Spreadsheet-like bindings.
SYNOPSIS
use Tk;
use Tk::TableMatrix::Spreadsheet;
my $t = $top->Scrolled('Spreadsheet', -rows => 21, -cols => 11,
-width => 6, -height => 6,
-titlerows => 1, -titlecols => 1,
-variable => $arrayVar,
-selectmode => 'extended',
-titlerows => 1,
-titlecols => 1,
-bg => 'white',
);
DESCRIPTION
Tk::TableMatrix::Spreadsheet is a Tk::TableMatrix-derived widget that implements some bindings so the resulting widget behaves more like a
spreadsheet.
Bindings Added:
o
Row/Col resize handles appear when the cursor is placed over a row/col border line in the rol/col title area.
Dragging these handles will resize the row or column. If multiple rows or columns are selected, then the new row/col size will apply to
all row/cols selected.
Note: With the base Tk::TableMatrix, it is possible to resize the row/cols by dragging on any cell border. To be more spreadsheet-like,
Tk::TableMatrix::Spreadsheet defaults to enable row/col resizing only thru the title row/col dragging. To override this default behavoir,
set the -resizeborder option to 'both' at startup.
o
A popup menu for row/col insert/delete appears when the mouse is right-clicked in the row/col title areas.
o
Cells activate (i.e. the contents become edit-able) only when the cell is double-clicked or the F2 button is pressed. The default
Tk::TableMatrix behavior is for the cell to be activated when the cell is single-clicked.
o
The Escape key causes any changes made to a cell to be canceled and the current selection cleared.
o
The return key causes the the current cell to move down.
o
The tab (or shift tab) key causes the current cell to be moved to the right (left).
o
The delete key will delete the current selection, if no cell is currently active.
o
The Mouse button 2 (middle button) paste from the PRIMARY. (Control-v pastes from the clipboard).
Additional Information
Widget methods, options, etc, are inherited from the Tk::TableMatrix widget. See its docs for additional information.
Tk1.23 2007-01-09 TableMatrix::Spreadsheet(3pm)