08-04-2011
Rename a header column by adding another column entry to the header column name
Hi All,
I have a file example.csv which looks like this
GrpID,TargetID,Signal,Avg_Num
CSCH74_1_1,2007,61,256
CSCH74_1_1,212007,647,679
CSCH74_1_1,12007,3,32
CSCH74_1_1,207,299,777
I want the output as
GrpID,TragetID,Signal-CSCH74_1_1,Avg_Num
CSCH74_1_1,2007,61,256
CSCH74_1_1,212007,647,679
CSCH74_1_1,12007,3,32
CSCH74_1_1,207,299,777
That is to say, the Signal header becomes Signal-CSCH74_1_1 using the 1st column entry.
Please help me urgently!!
Thanks
Last edited by Vavad; 08-05-2011 at 12:19 PM..
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
$ cat log.txt
Name Age Sex Lcation nfld alias xsd
CC 25 M XYZ asx KK Y
BB 21 F XAS awe SS N
SD 21 M AQW rty SD A
How can I replace the column with header "Lcation" with the column with header "alias" and delete the "alias" column?
so that the final output will become:
Name Age Sex... (10 Replies)
Discussion started by: jkl_jkl
10 Replies
2. Shell Programming and Scripting
i have a script that access the database and then returns some row. but in the command prompt it it not showing the column header. how to get that ?
below the script:
------------------------------------------------------------------------
#!/bin/ksh
.... (4 Replies)
Discussion started by: ali560045
4 Replies
3. Shell Programming and Scripting
Hello all,
We are trying to run a script in Oracle DB from AIX.
We need to set the Column Header while executing the query to generate the Output.
For eg.
select city, name from emp;
It need to generate report in .csv format as
CITY NAME
atla tom
cincin jack
How I... (1 Reply)
Discussion started by: velappangs
1 Replies
4. Shell Programming and Scripting
Hi All,
I have a file example.csv which looks like this
GrpID,TargetID,Signal,Avg_Num
CSCH74_1_1,2007,61,256
CSCH74_1_1,212007,647,679
CSCH74_1_1,12007,3,32
CSCH74_1_1,207,299,777
I want the output as
GrpID,TragetID,Signal-CSCH74_1_1,Avg_Num
CSCH74_1_1,2007,61,256... (4 Replies)
Discussion started by: Vavad
4 Replies
5. Shell Programming and Scripting
Hi,
I have an input like this
1 2 3 4
2 3 4 5
4 5 6 7
I would like to count the no. of columns and print a header with a prefix "Col".
I would also like to count the no. of rows and print as first column with each line number with a prefix "Row"
So, my output would be
... (2 Replies)
Discussion started by: jacobs.smith
2 Replies
6. Shell Programming and Scripting
Hi,
I have some 10 tab delimited flat files, for some files the column header starts from 1st row whereas for some other files the column header starts from row or row 3 or row4 and so on....
Is there any way in UNIX so that we can read the column headers dynamically.'
I am new to UNIX, so... (12 Replies)
Discussion started by: kedar_laveti
12 Replies
7. Shell Programming and Scripting
Hi,
Below is the data in a tab limited file
Here ACCENT is just a heading and the line starting with Pcode has the column headers, and there is a 2 lines space between the file header and column header.
I want to print $2, that is Dealer Name
I used the below code
nawk... (1 Reply)
Discussion started by: kedar_laveti
1 Replies
8. Shell Programming and Scripting
hello,
can someone helpe me on below issue.
i have a list of names and IDs,
mick 3424
noah 134
samuel 787
jack 434
i want to add a head for both colum using awk or sed or any tool
output
NAME ID
mick 3424
noah 134
samuel 787 (10 Replies)
Discussion started by: Sara_84
10 Replies
9. UNIX for Dummies Questions & Answers
Hi,
I have a txt file with multiple columns and i want to substitute the header of the first column.
Example:
Seq. Name Seq. Length #Hits min. eValue mean Similarity #GOs GOs Enzyme Codes InterProScan
comp1000201_c0_seq1 ---NA--- 337 0 0 -
comp1000297_c0_seq1 ---NA--- 612 0 0 -... (4 Replies)
Discussion started by: alisrpp
4 Replies
10. Shell Programming and Scripting
Hello,
I am trying to store sum of a column as a new column inside a file but have to find the column names dynamically
I/p
c1,c2,c3,c4,c5
10,20,30,40,50
20,30,40,50,60
If i want to find sum only column c1, c3 and output it as c6,c7
O/p
c1,c2,c3,c4,c5,c6,c7
10,20,30,40,50,30,70... (6 Replies)
Discussion started by: mkathi
6 Replies
LEARN ABOUT HPUX
sys_attrs_kevm
sys_attrs_kevm(5) File Formats Manual sys_attrs_kevm(5)
NAME
sys_attrs_kevm - KEVM (Kernel Event Manager) subsystem attributes
DESCRIPTION
This manpage lists and describes attributes for the Kernel Event Manager subsystem. See evm(5) for more information about Event Manager
software.
An asterisk preceding the name of an attribute in the following list means that the attribute can be configured at run time. Values of
other attributes cannot be changed without rebooting the system.
A value that can be used to reinitialize all of the
attributes. Changing to any non-zero value causes all the attributes to be reset to zero, and then itself is automatically reset
to zero.
Default value: 0
Minimum value: 0
Maximum value: 2,147,483,647
If you use to change the value of the updated attribute values are not visible until you exit and restart
The number of EVM events currently queued in kernel space for
collection by the EVM daemon. This attribute is query only.
The size (in bytes) of the fixed buffer used to queue any EVM events
that are posted while the kernel is executing at interrupt level. Events are moved out of the buffer as soon as the system
returns to normal operating mode. The default buffer size should be adequate for most systems.
Default value: 65, 536 (bytes)
Minimum value: 1
Maximum value: 1,844,674,407,370
A value that indicates whether a process (such as
currently has or does not have the interface in an open state. The value 1 means that a process has the interface open (always
the case if is running) and the value 0 means that no process has the interface open. This attribute is query only.
The major device number being used by the
interface. This attribute is query only.
The number of EVM events that have been posted in the kernel since the
the system was started or the counter was reset. You can reset directly, or by changing to a non-zero value.
Minimum value: 0
Maximum value: 2,147,483,647
The number of EVM events that have been read from kernel space by the
EVM daemon since the system was started or the counter was reset. You can reset manually or by changing to a non-zero value.
Minimum value: 0
Maximum value: 2,147,483,647
The highest number of EVM events that have been queued in kernel space
waiting to be collected by the EVM daemon since the system was started or the counter was reset. You can reset manually or by
changing to a non-zero value.
Minimum value: 0
Maximum value: 2,147,483,647
SEE ALSO
evm(5).
System Administration
sys_attrs_kevm(5)