Sponsored Content
Full Discussion: Add new column in Text File
Top Forums Shell Programming and Scripting Add new column in Text File Post 302288490 by pareshan on Tuesday 17th of February 2009 11:23:52 AM
Old 02-17-2009
thanks alot, it actually helped but what about that insert part. i posted everything my script and table structure
any help on that plz
thanks
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Need to get First column from the text file

Hey Guys, I have a very urgent requirement regaridng the searching for value on the text file. The text file is in the below format Number Description "112323", mysampletest1 "12122412", mysampletest2 "11232143", mysampletest3 I need to get the first column like 112323... (2 Replies)
Discussion started by: rahman_riyaz
2 Replies

2. UNIX for Dummies Questions & Answers

Replacing a column in a text file

Say I had a text file that contained four columns, like the following: Mack Christopher:237 Avondale Blvd:970-791-6419:S Ben Macdonor:30 Dragon Rd:647-288-6395:B I'm making a loop that will replace the fourth column a line in the file with the contents of a variable 'access', but I have no... (6 Replies)
Discussion started by: Sotau
6 Replies

3. Shell Programming and Scripting

Finding the last column value from a text file

Hi, I need to find out the last column value from a text file which is delimited by a tab. The issue here is the last column# for each record can be different i.,e, 1st record can have the last column as 15 and the second record can have the last column as "17". I have to search a string... (3 Replies)
Discussion started by: naveen_sangam
3 Replies

4. UNIX for Dummies Questions & Answers

Add a new column to a tab delimited text file

I want to add a new column to a tab delimited text file. It will be the first column and it will just be 1's. How do I go about doing that? Thanks! (1 Reply)
Discussion started by: evelibertine
1 Replies

5. UNIX for Dummies Questions & Answers

Replacing a specific column of a text file with another column

I have a text file in the following format: 13412 NA06985 0 0 2 46.6432798439 4 4 4 4 13412 NA06991 NA06993 NA06985 2 48.8478948517 4 4 2 4 13412 NA06993 0 0 1 45.8022601455 4 4 2 4 13401 NA06994 0 0 1 48.780669145 4 4 4 4 13401 NA07000 0 0 2 47.7312017846 2 4 4 4 13402 NA07019... (3 Replies)
Discussion started by: evelibertine
3 Replies

6. UNIX for Dummies Questions & Answers

Replacing a specific column of a text file with another column

Hi, I have a text file in the following format: Code: 13412 NA06985 0 0 2 46.6432798439 4 4 4 4 13412 NA06991 NA06993 NA06985 2 48.8478948517 4 4 2 4 13412 NA06993 0 0 1 45.8022601455 4 4 2 4 13401 NA06994 0 0 1 48.780669145 4 4 4 4 13401 NA07000 0 0 2 47.7312017846 2 4 4 4 ... (2 Replies)
Discussion started by: evelibertine
2 Replies

7. UNIX for Dummies Questions & Answers

Extracting the last column of a text file

I would like to extract the last column of a text file but different rows of the text file have different numbers of columns. How do I go about doing that? Thanks! (1 Reply)
Discussion started by: evelibertine
1 Replies

8. Shell Programming and Scripting

Howto add a constant column to the text file

Hi, I am converting a .DBF file to pipe delimited file my requirement is like lets say my .DBF is residing in path /a/b/c/d/f/abc.DBF I need my .txt file as having a column with source _cd =f sample data in .DBF in folder "f" c1 c2 c3 1 2 3 in txt file it should be... (4 Replies)
Discussion started by: angel12345
4 Replies

9. UNIX for Dummies Questions & Answers

Add a column of 0's to a text file

Hi, I have a text file with many column (1,000,000+). I want to add a column of 0's as the third column. I tried: awk '{$3=0}1' input file > output file But it simply replaces the third column with 0's instead of adding a new column. How do I go about doing this? Thanks! (2 Replies)
Discussion started by: evelibertine
2 Replies

10. Shell Programming and Scripting

Compare 2 text file with 1 column in each file and write mismatch data to 3rd file

Hi, I need to compare 2 text files with around 60000 rows and 1 column. I need to compare these and write the mismatch data to 3rd file. File1 - file2 = file3 wc -l file1.txt 58112 wc -l file2.txt 55260 head -5 file1.txt 101214200123 101214700300 101250030067 101214100500... (10 Replies)
Discussion started by: Divya Nochiyil
10 Replies
Gtk2::CellLayout(3)					User Contributed Perl Documentation				       Gtk2::CellLayout(3)

NAME
Gtk2::CellLayout SYNOPSIS
# This is an abstract interface; the CellLayout interface is # implemented by concrete classes like ComboBox and TreeViewColumn. # See the discussion for details on creating your own CellLayout. # This synopsis assumes you already have an instance in $cell_layout. # Add a cell renderer that shows the pixbuf in column 2 of the # associated TreeModel. It will take up only the necessary space # ("expand" => FALSE). my $cell = Gtk2::CellRendererPixbuf->new (); $cell_layout->pack_start ($cell, FALSE); $cell_layout->add_attribute ($cell, pixbuf => 2); # Add another cell renderer that gets the "text" property from # column 3 of the associated TreeModel, and takes up all remaining # horizontal space ("expand" => TRUE). my $cell = Gtk2::CellRendererText->new (); $cell_layout->pack_start ($cell, TRUE); $cell_layout->add_attribute ($cell, text => 3); DESCRIPTION
Gtk2::CellLayout is an interface to be implemented by all objects which want to provide a Gtk2::TreeViewColumn-like API for packing cells, setting attributes and data funcs. HIERARCHY
Glib::Interface +----Gtk2::CellLayout METHODS
$cell_layout->add_attribute ($cell, $attribute, $column) o $cell (Gtk2::CellRenderer) o $attribute (string) o $column (integer) Adds an attribute mapping to the list in $cell_layout. The $column is the column of the model from which to get a value, and the $attribute is the property of $cell to be set from the value. So, for example, if column 2 of the model contains strings, you could have the "text" attribute of a Gtk2::CellRendererText get its values from column 2. $cell_layout->set_attributes ($cell, ...) o $cell (Gtk2::CellRenderer) o ... (list) list of property name and column number pairs. Sets the pairs in the ... list as the attributes of $cell_layout, as with repeated calls to "add_attribute". All existing attributes are removed, and replaced with the new attributes. $cell_layout->set_cell_data_func ($cell, $func, $func_data=undef) o $cell (Gtk2::CellRenderer) o $func (scalar) o $func_data (scalar) Sets up $cell_layout to call $func to set up attributes of $cell, instead of the standard attribute mapping. $func may be undef to remove an older callback. $func will receive these parameters: $cell_layout The cell layout instance $cell The cell renderer to set up $model The tree model $iter TreeIter of the row for which to set the values $data The $func_data passed to "set_cell_data_func" list = $cell_layout->get_cells Fetch all of the cell renderers which have been added to $cell_layout. Since: gtk+ 2.12 $cell_layout->clear Unsets all the mappings on all renderers on $cell_layout and removes all renderers attached to it. $cell_layout->clear_attributes ($cell) o $cell (Gtk2::CellRenderer) Clears all existing attributes previously set with for $cell with "add_attribute" or "set_attributes". $cell_layout->pack_end ($cell, $expand) o $cell (Gtk2::CellRenderer) o $expand (boolean) Like "pack_start", but adds from the end of the layout instead of the beginning. $cell_layout->pack_start ($cell, $expand) o $cell (Gtk2::CellRenderer) o $expand (boolean) Packs $cell into the beginning of $cell_layout. If $expand is false, then $cell is allocated no more space than it needs. Any unused space is divided evenly between cells for which $expand is true. $cell_layout->reorder ($cell, $position) o $cell (Gtk2::CellRenderer) o $position (integer) Re-insert $cell at $position. $cell must already be packed into $cell_layout. CREATING A CUSTOM CELL LAYOUT
GTK+ provides several CellLayout implementations, such as Gtk2::TreeViewColumn and Gtk2::ComboBox. To create your own object that implements the CellLayout interface and therefore can be used to display CellRenderers, you need to add Gtk2::CellLayout to your class's "interfaces" list, like this: package MyLayout; use Gtk2; use Glib::Object::Subclass Gtk2::Widget::, interfaces => [ Gtk2::CellLayout:: ], ; This will cause perl to call several virtual methods with ALL_CAPS_NAMES when GTK+ attempts to perform certain actions. You simply provide (or override) those methods with perl code. The methods map rather directly to the object interface, so it should be easy to figure out what they should do. Those methods are: PACK_START ($cell_layout, $cell, $expand) PACK_END ($cell_layout, $cell, $expand) CLEAR ($cell_layout) ADD_ATTRIBUTE ($cell_layout, $cell, $attribute, $column) SET_CELL_DATA_FUNC ($cell_layout, $cell, $func, $data) CLEAR_ATTRIBUTES ($cell_layout, $cell) REORDER ($cell_layout, $cell, $position) list = GET_CELLS ($cell_layout) SEE ALSO
Gtk2, Glib::Interface 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::CellLayout(3)
All times are GMT -4. The time now is 05:30 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy