Sponsored Content
Top Forums Shell Programming and Scripting Insert rows with computations of next row Post 302147359 by Franklin52 on Monday 26th of November 2007 01:29:05 PM
Old 11-26-2007
With this solution you don't get the format as you requested, try my last script.

Regards
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Concatenate 2 rows into 1 row

I need to search a file for two values (valueA & valueB). ValueA will be on a different row than valueB, and concatenate the two together on the same row of my output. Example: search input file for strings "node" and "OS", combine the two results into one row input node A text text OS... (4 Replies)
Discussion started by: indianadoug
4 Replies

2. UNIX for Dummies Questions & Answers

insert header row into .xls

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

3. Shell Programming and Scripting

How to insert data befor some field in a row of data depending up on values in row

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)
Discussion started by: aemunathan
8 Replies

4. Shell Programming and Scripting

insert txt in the row

hi i am having text file like this 444 raju 666 ranga Clerk 999 rani officer 111 juhi i want to get the out put as 444 raju NA 666 ranga Clerk 999 rani officer 111 juhi NA pls help (5 Replies)
Discussion started by: suryanarayana
5 Replies

5. UNIX for Advanced & Expert Users

convert rows to single row

Hi I want to convert multiple rows ro single row ,I have tried with below one but I am not getting what I am expecting.Please any idea a.txt conn1=stg conn2=dev path=\xxx\a1.txt fre=a conn1=stg conn2=dev path=\xxx\a2.txt freq=a awk '/a/{ORS=" "}{print}END{print "\n"}'... (5 Replies)
Discussion started by: akil
5 Replies

6. UNIX for Advanced & Expert Users

Converting rows to a single row

Hi all I have a file as below : Development System User Production i want to convert the file to below format: "Development","System","User","Production" Is it possible with UNIX ? if so can you please give me some direction on it ? Thanks, Satya Use code tags please, ty. (10 Replies)
Discussion started by: satyaranjon
10 Replies

7. UNIX for Dummies Questions & Answers

Insert rows with some rules??

Hi, I am rather new to Unix/Linus. I have this problem that I would like to solve using unix. Here is what I have start stop expression 1 5 15 2 6 10 I want a output like this position expression 1 15 2 25 3 ... (1 Reply)
Discussion started by: wanghlv
1 Replies

8. Shell Programming and Scripting

Print various rows in one row

I have this in a file 11.22.33.44 yyyyyyuser With awk/sed, I need this to be output as follows alias server.domain.com='ssh yyyyyyuser@11.22.33.44' (4 Replies)
Discussion started by: anil510
4 Replies

9. UNIX for Dummies Questions & Answers

Insert row into empty file...how?

Greetings: I generate an empty flat file just fine when there's no data returned from my process, as the customer wants one always (using the 1st line of the below script). However, they also want at least the column names in this flat file (row 1, the only row to be in the emply file). I'm... (7 Replies)
Discussion started by: Benrosa
7 Replies

10. Shell Programming and Scripting

Splitting single row into multiple rows based on for every 10 digits of last field of the row

Hi ALL, We have requirement in a file, i have multiple rows. Example below: Input file rows 01,1,102319,0,0,70,26,U,1,331,000000113200000011920000001212 01,1,102319,0,1,80,20,U,1,241,00000059420000006021 I need my output file should be as mentioned below. Last field should split for... (4 Replies)
Discussion started by: kotra
4 Replies
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)
All times are GMT -4. The time now is 07:05 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy