Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Converting column to rows for every 3 lines in the column Post 302645237 by kokoro on Wednesday 23rd of May 2012 06:38:41 AM
Old 05-23-2012
thanks guys! all of these worked for me.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Converting Column to Rows in a Flat file

Hi, Request To guide me in writing a shell program for the following requirement: Example:if the Input File contains the follwing data Input File Data: 80723240029,12,323,443,88,98,7,98,67,87 80723240030,12,56,6,,,3,12,56,6,7,2,3,12,56,6,7,2,3,88,98,7,98,67,87... (5 Replies)
Discussion started by: srinikal
5 Replies

2. Shell Programming and Scripting

Converting Single Column into Multiple rows

i have single column which is starting with same string(many number of rows) i have to convert each into a single row.how can i do that? laknar std mes 23 55 laknar isd phone no address amount 99 I have to convert above like below. laknar|std|mes|23|55 laknar|isd|phone... (3 Replies)
Discussion started by: laknar
3 Replies

3. Shell Programming and Scripting

command for converting 4 column data to 1 column

dear friends I want to convert four column data to one column data. For example: from 1, 2, 3, 4 5, 6, 7, 8to 1 2 3 4 5 6 7 8what is the general command for that type of convertion. thanks (5 Replies)
Discussion started by: rpf
5 Replies

4. Shell Programming and Scripting

Converting entries from rows to column

Hi all, I need your help on a multiple row entry into different columns. And do the same with all the entries in file. File example (showing 2 entries only, there are many like these): >ABC * AGA-AUUCUC-CGGUUCAAUCU ||| UCUAUAACCGCGCCGAGUUAGU >ABC * AGAUAU-GCUGCAGGCUCAAUUG ||||||... (2 Replies)
Discussion started by: atulkakrana
2 Replies

5. Shell Programming and Scripting

Converting rows to column

i have output of script as below name,roll_no,01-05-12,02-05-12,03-05-12 sam,12,24,24,24 jon,145,24,24,22 van,29,24,22,24 i want to convert these into columns as output is not fixed please tell me how to convert 1st row in to 1st columns likewise,as many rows are there are to be converted... (4 Replies)
Discussion started by: sagar_1986
4 Replies

6. Shell Programming and Scripting

awk command to print only selected rows in a particular column specified by column name

Dear All, I have a data file input.csv like below. (Only five column shown here for example.) Data1,StepNo,Data2,Data3,Data4 2,1,3,4,5 3,1,5,6,7 3,2,4,5,6 5,3,5,5,6 From this I want the below output Data1,StepNo,Data2,Data3,Data4 2,1,3,4,5 3,1,5,6,7 where the second column... (4 Replies)
Discussion started by: ks_reddy
4 Replies

7. UNIX for Dummies Questions & Answers

[Solved] Deleting all rows where the first column equals the second column

Hi, I have a tab delimited text file where the first two columns equal numbers. I want to delete all rows where the value in the first column equals the second column. How do I go about doing that? Thanks! Input: 1 1 ABC DEF 2 2 IJK LMN 1 2 ZYX OPW Output: 1 2 ZYX OPW (2 Replies)
Discussion started by: evelibertine
2 Replies

8. UNIX for Dummies Questions & Answers

awk - Extract 4 lines in Column to Rows Tab Delimited between tags

I have tried the following to no avail. xargs -n8 < test.txt awk '{if(NR%6!=0){p=""}else{p="\n"};printf $0" "p}' Mod_Alm_log.txt > test.txt I have tried different variations of the above, the problem is mixes lines together. And it includes the tags "%a and %A" I need them to be all tab... (16 Replies)
Discussion started by: mytouchsr
16 Replies

9. Shell Programming and Scripting

Converting Single Column into Multiple rows, but with strings to specific tab column

Dear fellows, I need your help. I'm trying to write a script to convert a single column into multiple rows. But it need to recognize the beginning of the string and set it to its specific Column number. Each Line (loop) begins with digit (RANGE). At this moment it's kind of working, but it... (6 Replies)
Discussion started by: AK47
6 Replies

10. Shell Programming and Scripting

Converting Single Column into Multiple rows

Hi .. anyone can you help me ? i need to convert text below into multiple columns interface; GigabitEthernet0/0/0/0 description; TRUNK_PE-D2-JT2-VPN_Gi0/0/0/0_TO_ME4-A-JKT-JT_4/1/1_1G mtu 9212 negotiation auto interface; GigabitEthernet0/0/0/0.11 description; tes encapsulation;... (1 Reply)
Discussion started by: mad3linux
1 Replies
tixGrid(n)						       Tix Built-In Commands							tixGrid(n)

NAME
tixGrid - Create and manipulate Tix Grid widgets -background -borderWidth -cursor -font -foreground -height -highlight- Color -highlightThickness -relief -selectBackground -selectForeground -width -xScrollCommand -yScrollCommand WIDGET-SPECIFIC OPTIONS [-editdonecmd editDoneCmd] If non-empty, gives a Tcl command to be executed when the user has edited grid cell. When this command is called, it is passed with two additional parameters: x y, where (x,y) is the location of the cell that has just been edited. [-editnotify- cmd editNotifyCmd] If non-empty, gives a Tcl command to be executed when the user tries to edit a grid cell. When this command is called, it is passed with two additional parameters: x y, where (x,y,) is the location of the cell. This command should return a boolean value: true indicates that the cells is editable and false otherwise. [-formatcmd formatCmd] If non-empty, gives a Tcl command to be executed when the grid cells need to be formatted on the screen. Normally, this command calls the format widget command (see below). When this com- mand is called, it is passed with five additional parameters: type x1 y1 x2 y2. type gives the logical type of the region in the grid. It may be one of the following. x-region: the horizontal margin; y-region: the vertical margin; s-region, the area where the the horizontal and vertical margins are joined; main: all the cells that do not fall into the above three types. x1 y1 x2 y2 gives the extent of the region that needs formatting. [-leftmargin leftMargin] In the number of cells, gives the width of vertical margin. A zero indicates that no vertical should be drawn. [-selectmode selectMode] Specifies one of several styles for manipulating the selection. The value of the option may be arbitrary, but the default bindings expect it to be either single, browse, multiple, or extended; the default value is sin- gle. [-selectunit selectUnit] Specifies the selection unit. Valid values are cell, column or row. [-topmargin topMargin] In the number of cells, gives the height of horizontal margin. A zero indicates that no horizontal should be drawn. DESCRIPTION
The tixGrid command creates a new window (given by the pathName argument) and makes it into a tixGrid widget. Additional options, described above, may be specified on the command line or in the option database to configure aspects of the tixGrid widget such as its cur- sor and relief. A Grid widget displays its contents in a two dimensional grid of cells. Each cell may contain one Tix display item, which may be in text, graphics or other formats. See the tixDisplayStyle manual page for more information about Tix display items. Individual cells, or groups of cells, can be formatted with a wide range of attributes, such as its color, relief and border. WIDGET COMMAND
The tixGrid command creates a new Tcl command whose name is the same as the path name of the tixGrid widget's window. This command may be used to invoke various operations on the widget. It has the following general form: pathName option ?arg arg ...? PathName is the name of the command, which is the same as the tixGrid widget's path name. Option and the args determine the exact behavior of the command. The following commands are possible for tixGrid widgets: pathName anchor option ?args ...? Manipulates the anchor cell of the tixGrid widget. The anchor cell is the end of the selection that is fixed while the user is drag- ging out a selection with the mouse. pathName bdtype TODO place holder pathName cget option Returns the current value of the configuration option given by option. Option may have any of the values accepted by the tixGrid command. pathName configure ?option? ?value option value ...? Query or modify the configuration options of the widget. If no option is specified, returns a list describing all of the available options for pathName (see Tk_ConfigureInfo(n) for information on the format of this list.) If option is specified with no value, then the command returns a list describing the one named option (this list will be identical to the corresponding sublist of the value returned if no option is specified). If one or more option-value pairs are specified, then the command modifies the given wid- get option(s) to have the given value(s); in this case the command returns an empty string. Option may have any of the values accepted by the tixGrid command. pathName delete dim from ?to? Dim may be row or column. If to is not given, deletes a single row (or column) at the position from. If to is given, deletes the range of rows (or columns) from position from through to. pathName edit apply If any cell is being edited, de-highlight the cell and applies the changes. pathName edit set x y Highlights the cell at (x,y) for editing, if the -editnotify command returns true for this cell. pathName entrycget x y option Returns the current value of the configuration option given by option of the cell at (x,y). Option may have any of the values accepted by the set widget command. pathName entryconfigure x y ?option? ?value option value ...? Query or modify the configuration options of the cell at (x,y). If no option is specified, returns a list describing all of the available options for the cell (see Tk_ConfigureInfo(n) for information on the format of this list.) If option is specified with no value, then the command returns a list describing the one named option (this list will be identical to the corresponding sublist of the value returned if no option is specified.) If one or more option-value pairs are specified, then the command modifies the given widget option(s) to have the given value(s); in this case the command returns an empty string. Option may have any of the values accepted by the set widget command. pathName format TODO place holder pathName index TODO place holder pathName move dim from to offset Dim may be row or column. Moves the the range of rows (or columns) from position from through to by the distance indicated by off- set. For example, move row 2 4 1 moves the rows 2,3,4 to rows 3,4,5. pathName set x y ?-itemtype type? ?option value...? Creates a new display item at the cell at (x,y). The optional -itemtype parameter gives the type of the display item. An additional list of option-value pairs specify options of the display item. If a display item already exists at this cell, the old item will be deleted automatically. pathName size dim index ?option value ...? Queries or sets the size of the row or column given by dim and index. Dim may be row or column. Index may be any non-negative inte- ger that gives the position of a given row (or column). Index can also be the string default; in this case, this command queries or sets the default size of all rows (or columns). When no option-value pair is given, this command returns a list containing the current size setting of the given row (or column). When option-value pairs are given, the corresponding options of the size setting of the given row are changed. Option may be one of the foll- wing: -pad0 pixels Specifies the paddings to the left or a column or the top of a row. -pad1 pixels Specifies the paddings to the right or a column or the bottom of a row. -size val Specifies the width of a column or the height of a row. Val may be: auto -- the width of the column is set the the widest cell in the column; a valid Tk screen distance unit (see Tk_GetPixels(n)); or a real number following by the word chars (e.g. 3.4chars) that sets the width of the column to the given number of characters. pathName unset x y Clears the cell at (x,y) by removing its display item. pathName xview TODO place holder pathName yview TODO place holder KEYWORDS
grid, spread sheet, table Tix 4.1 tixGrid(n)
All times are GMT -4. The time now is 07:59 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy