Sponsored Content
Full Discussion: title of newly added column
Top Forums Shell Programming and Scripting title of newly added column Post 302480021 by ravi.videla on Monday 13th of December 2010 07:37:40 PM
Old 12-13-2010
title of newly added column

Hi,

I have a csv file. I need to add one column at begining of the file, It just contains one value "amr". I am able to add column but unable to put title to it.

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

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

Below code gives me output file by adding new column at begining. But it gives "amr" as title, I want title of column as "region". Appreciate your help on this.
Code:
awk '{print "AMR," $0}' <filename>

 

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
amr(7D) 																   amr(7D)

NAME
amr - SCSI HBA driver for Dell PERC 3/DC, 4/SC, 4/DC and 4/DI The amr plain SCSI host bus adapter driver is a SCSA-compliant nexus driver that supports the Dell PERC 3DC/4SC/4DC/4Di RAID devices. The amr driver ports from FreeBSD and only supports basic RAID disk I/O functions. DRIVER CONFIGURATION
There are no user configurable parameters available. Please configure your hardware through BIOS. See attributes(5) for a description of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability | | +-----------------------------+-----------------------------+ FILES
/kernel/drv/amr 32-bit ELF kernel module. /kernel/drv/amd64/amr 64-bit kernel module ( only). /kernel/drv/amr.conf Driver configuration file (contains no user-configurable options). prtconf(1M), attributes(5), lsimega(7D), scsi_hba_attach(9F), scsi_sync_pkt(9F), scsi_transport(9F), scsi_inquiry(9S), scsi_device(9S), scsi_pkt(9S) Small Computer System Interface-2 (SCSI-2) 20 April 2005 amr(7D)
All times are GMT -4. The time now is 05:15 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy