10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I have a comma separated file. I would like to print every alternate columns into a new row.
Example input file:
Name : John, Age : 30, DOB : 30-Oct-2018
Example output:
Name,Age,DOB
John,30,30-Oct-2018 (3 Replies)
Discussion started by: Lini
3 Replies
2. Shell Programming and Scripting
Hi All ,
I have to write one Perl script in which I need to read one pre-existing xls and based on pattern match for one word in some cells of the XLS , I need to fill the entire row with one color of that matched cell and write the content to another excel
Please find the below stated... (2 Replies)
Discussion started by: kshitij
2 Replies
3. UNIX for Beginners Questions & Answers
This is a question that is related to one I had last August when I was trying to sort/merge two files by millsecond time column (in this case column 6).
The script (below) that helped me last august by RudiC solved the puzzle of sorting/merging two files by time, except it gets lost when the... (0 Replies)
Discussion started by: aachave1
0 Replies
4. UNIX for Beginners Questions & Answers
My original files are like this below and I distinguish them from the AP_ID (file1 has 572 and file2 has 544). Also, the header on file1 has “G_” pre-pended. NOTE: these are only snippets of very large files and much of the data is not present here.
Original File 1:
... (36 Replies)
Discussion started by: aachave1
36 Replies
5. Shell Programming and Scripting
Hi. How can I read row number from one file and print that corresponding record present at that row in another file.
eg
file1
1
3
5
7
9
file2
11111
22222
33333
44444
55555
66666
77777
88888
99999 (3 Replies)
Discussion started by: Abhiraj Singh
3 Replies
6. UNIX for Dummies Questions & Answers
file with this content
awk 'NR==1 {print $4} && NR==2 {print $5}' file
The error is shown with syntax error; what can be done (4 Replies)
Discussion started by: cdfd123
4 Replies
7. Shell Programming and Scripting
Hi Friends,
I have a single column data like below.
1
2
3
4
5
I need the output like below.
0
1
2
3
4
where each row (including first row) subtracting from first row and the result should print below like the way shown in output file.
Thanks
Sid (11 Replies)
Discussion started by: ks_reddy
11 Replies
8. Shell Programming and Scripting
hi guys, today i'm stuck in a new problem.
the title explain more or less but a particular had been omitted. So i'm going to describe below the situation with an example.
I have different html files and each of them have a consecutive lines group inside that i want to extract.
example:
... (8 Replies)
Discussion started by: sbobotex
8 Replies
9. Shell Programming and Scripting
Hi
I want to append line 2n to 2n-1 line where n=1...LastLine in my file.
eg:
Actual File:
Hello
Everyone
Welcome
TO Unix
I need
Your help
Required File:
HelloEveryone
WelcomeTO Unix
I needYour help (5 Replies)
Discussion started by: dashing201
5 Replies
10. Shell Programming and Scripting
Hi,
I want to write a shell script which increments a particular column in a row from a text file and then adds another row below the current row with the incremented value .
For Eg .
if the input file has a row :
abc xyz lmn 89 lm nk o p
I would like the script to create something like... (9 Replies)
Discussion started by: aYankeeFan
9 Replies
Table(3) User Contributed Perl Documentation Table(3)
NAME
Tk::Table - Scrollable 2 dimensional table of Tk widgets
SYNOPSIS
use Tk::Table;
$table = $parent->Table(-rows => number,
-columns => number,
-scrollbars => anchor,
-fixedrows => number,
-fixedcolumns => number,
-takefocus => boolean);
$widget = $table->Button(...);
$old = $table->put($row,$col,$widget);
$old = $table->put($row,$col,"Text"); # simple Label
$widget = $table->get($row,$col);
$cols = $table->totalColumns;
$rows = $table->totalRows;
$table->see($widget);
$table->see($row,$col);
($row,$col) = $table->Posn($widget);
DESCRIPTION
Tk::Table is an all-perl widget/geometry manager which allows a two dimensional table of arbitary perl/Tk widgets to be displayed.
Entries in the Table are simply ordinary perl/Tk widgets. They should be created with the Table as their parent. Widgets are positioned in
the table using:
$table->put($row,$col,$widget)
If $widget is not a reference it is treated as a string, and a Lable widget is created with the string as its text.
All the widgets in each column are set to the same width - the requested width of the widest widget in the column. Likewise, all the
widgets in each row are set to the same height - the requested height of the tallest widget in the column.
A number of rows and/or columns can be marked as 'fixed' - and so can serve as 'headings' for the remainder the rows which are scrollable.
The requested size of the table as a whole is such that the number of rows specified by -rows (default 10), and number of columns specified
by -columns (default 10) can be displayed.
If the Table is told it can take the keyboard focus then cursor and scroll keys scroll the displayed widgets.
The Table will create and manage its own scrollbars if requested via -scrollbars.
The table can be emptied using
$table->clear
the widgets which were in the table are destroyed.
The Tk::Table widget is derived from a Tk::Frame, so inherits all its configure options.
BUGS
/ Snags / Possible enhancements
o Very large Tables consume a lot of X windows.
o No equivalent of pack's -anchor/-pad etc. options
SEE ALSO
Tk::grid, Tk::HList, Tk::TableMatrix, Tk::MListbox, Tk::Columns
perl v5.12.1 2007-11-08 Table(3)