Sponsored Content
Full Discussion: title of newly added column
Top Forums Shell Programming and Scripting title of newly added column Post 302480023 by ravi.videla on Monday 13th of December 2010 07:59:38 PM
Old 12-13-2010
Thanks for quick reply. It works fine.
Few days back, I raised another question in this forum mainly to add 2 columns after column1. Below is URL of the post.

https://www.unix.com/shell-programmin...#post302478356

Just wondering if i can do both these tasks using single command.

Input Data:
Code:
call_id,conn_id,result,ani
1,100,hungup,7601234
2,101,hungup,7601235

Desired Output:
Code:
region,call_id,key,value,conn_id,result,ani
amr,1,100,dummy,10,hungup,7601234
amr,2,101,dummy,10,hungup,7601235

---------- Post updated at 04:59 PM ---------- Previous update was at 04:57 PM ----------

Correction to desired Output: In summary we want to add three dummy columns. One at beginning of the file, other two after column1.

Code:
region,call_id,key,value,conn_id,result,ani
amr,1,dummy,10,100,hungup,7601234
amr,2,dummy,10,101,hungup,7601235

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to find the newly created directory

Hi, I need to create new directory by increasing the number by 1 of extracted lastly created directory. e.g. Log\out_log_1\ Log\out_log_2\ Log\out_log_3\ become Log\out_log_1\ Log\out_log_2\ Log\out_log_3\ Log\out_log_4\ Can anyone help how to do it in c-shell... (3 Replies)
Discussion started by: Andre_2008
3 Replies

2. Red Hat

Redhat 5 can't see my newly added LUN.

hi all, i have added new LUN to Redhat 5. i have already scanned LUN devices and it is confirmed that Kernel sees the newly added LUN's. i have used /proc/partitions and verified that my disks are there. However, i cannot find my disk using fdisk -l command. I am not sure what did i... (2 Replies)
Discussion started by: gisu0602
2 Replies

3. Shell Programming and Scripting

List of filenames where column title matches string and value is in limits

I'm somewhat new to BASH scripting but have managed to work my way through most of a problem. I'm trying to get a list of filenames where a column header occurs and any value in that column is within a range. So far I can sort through the list of files in a directory specified by the user, find... (5 Replies)
Discussion started by: hu_r_u2000
5 Replies

4. UNIX for Dummies Questions & Answers

how to open file and see newly added updates

Hi, I just forgot what command we can use to open a file, and then see its updates, I remember that there is an option -f ,but with what command :wall: Tx Trent (1 Reply)
Discussion started by: trento17
1 Replies

5. Red Hat

Partitioning newly added disk to Redhat

Hi Everyone, I have added new Virtual disk to OS. The main point is I need to bring this whole Disk into LVM control, is it necessary to partition the disk using fdisk command and assign partition type as '8e', or can I directly add that disk into LVM, by running pvcreate command with out... (2 Replies)
Discussion started by: bobby320
2 Replies

6. Shell Programming and Scripting

Using filename to determine a prefix that needs to be added to string column on file?

Possible filenames: CDD_Whatever.txt DDD_Whatever.txt If the file prefix = CDD, I'd like to prefix every person ID (second column in my examples below) on the file with "c-" If the file prefix = DDD, I'd like to prefix ever person ID with "d-" Input: Desired Output: Any help... (2 Replies)
Discussion started by: lrluis
2 Replies

7. Hardware

Formatting a newly created lun

Hi , I have created one new lun in my SAN storage and make it visible to my HP servers , but the fdisk -l output is somehow confusing. Do not know what to do next ---------- fdisk -l /dev/sdo1 Disk /dev/sdo1 (Sun disk label): 64 heads, 32 sectors, 10238 cylinders Units =... (7 Replies)
Discussion started by: mishra.sankar
7 Replies

8. UNIX for Advanced & Expert Users

CVS: can not checkout a newly added file

My project is on solaris 10 using cvs 1.12.13. A team member has added a new file to the repo using the add command followed by commit. When another team member executes the status command in the directory containing the new file they do not get notifiction that there is a file that needs to be... (0 Replies)
Discussion started by: twk
0 Replies

9. Red Hat

"Unable to Detect Newly added HDD - Redhat 5"

Hi Folks, I am unable to detected newly added HDD in my redhat-5 OS. I am expecting to get /dev/sdb. Following are the utilized commands or syntax. root@hostname% cat /etc/redhat-release Red Hat Enterprise Linux Client release 5.4 (Tikanga) echo "- - -" > /sys/class/scsi_host/host0/scan %... (1 Reply)
Discussion started by: Sricharan21
1 Replies

10. Linux

Mount a newly added LUN on a GNU/Linux distro

Hi I am not familiar with the linux, but I was asked to create a file system on a LUN from the NetApp that was mapped to the linux server. The server is runing: uname -a Linux localhost.localdomain 2.6.18-92.el5 #1 SMP Tue Apr 29 13:16:15 EDT 2008 x86_64 x86_64 x86_64 GNU/Linux and now... (6 Replies)
Discussion started by: fretagi
6 Replies
GTK(3pm)						User Contributed Perl Documentation						  GTK(3pm)

NAME
Data::TreeDumper::Renderer::GTK - Gtk2::TreeView renderer for Data::TreeDumper SYNOPSIS
my $treedumper = Data::TreeDumper::Renderer::GTK->new ( data => \%data, title => 'Test Data', dumper_setup => {DISPLAY_PERL_SIZE => 1} ); $treedumper->modify_font(Gtk2::Pango::FontDescription->from_string ('monospace')); $treedumper->expand_all; # some boilerplate to get the widget onto the screen... my $window = Gtk2::Window->new; my $scroller = Gtk2::ScrolledWindow->new; $scroller->add ($treedumper); $window->add ($scroller); $window->show_all; HIERARCHY
Glib::Object +----Gtk2::Object +----Gtk2::Widget +----Gtk2::Container +----Gtk2::TreeView +----Data::TreeDumper::Renderer::GTK DESCRIPTION
GTK-perl renderer for Data::TreeDumper. This widget is the gui equivalent of Data::TreeDumper; it will display a perl data structure in a TreeView, allowing you to fold and unfold child data structures and get a quick feel for what's where. Right-clicking anywhere in the view brings up a context menu, from which the user can choose to expand or collapse all items. EXAMPLE
gtk_test.pl METHODS
widget = Data::TreeDumper::Renderer::GTK::TreeDumper->new (...) Create a new TreeDumper. The optional arguments are expect to be key/val pairs. - dumper_setup => hash reference All data is passed to Data::TreeDumper - data => scalar Equivalent to calling "$treedumper->set_data ($scalar)". - title => string or undef Equivalent to calling "$treedumper->set_title ($string)". $treedumper->set_data ($newdata) o $newdata (scalar) Fill the tree with $newdata, which may be any scalar. The tree does not reference $newdata -- necessary data is copied. $treedumper->set_title ($title=undef) o $title (string or undef) a new title Set the string displayed as the column title. The view is created with one column, and the header is visible only if there is a title set. EXPORT
None AUTHORS
Khemir Nadim ibn Hamouda. <nadim@khemir.net> Muppet <scott at asofyet dot org> Copyright (c) 2005 Nadim Ibn Hamouda el Khemir and Muppet. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perlitself. If you find any value in this module, mail me! All hints, tips, flames and wishes are welcome at <nadim@khemir.net>. SEE ALSO
Data::TreeDumper for advanced usage of the dumper engine. perl v5.10.1 2008-08-30 GTK(3pm)
All times are GMT -4. The time now is 06:06 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy