10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
How to insert header with underline
AM able to insert only header not underline
sed '1i NAME COUNTRY' test.txt
input file
UK 1234
USA 2354
AUS 2253
IND 4256
Output file
NAME COUNTRY_CODE
---- ------------
UK 1234
USA 2354
AUS 2253
IND 4256 (5 Replies)
Discussion started by: Kalia
5 Replies
2. Shell Programming and Scripting
I am just trying to insert the word "Index" using awk. The below is close but seems to add the word at the end and I can not get the syntax correct to add from the beginning. Thank you :).
awk -F'\t' -v OFS='\t' '{ $-1=$-1 OFS "Index"}$1=$1' file
current output
Chr Start End ... (3 Replies)
Discussion started by: cmccabe
3 Replies
3. Shell Programming and Scripting
Hi,
So I am trying to print the first row(header) first column alongwith the matched value. But I am not sure how do I print the same, by matching a pattern located in the file
eg
File contents
Name Place
Jim NY
Jill NJ
Cathy CA
Sam TX
Daniel FL
And what I want is... (2 Replies)
Discussion started by: sidnow
2 Replies
4. 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
5. UNIX for Dummies Questions & Answers
Friends,
I need help with the following in UNIX.
Merge all csv files in one folder considering only 1 header row and ignoring header of all other files.
FYI - All files are in same format and contains same headers.
Thank you (4 Replies)
Discussion started by: Shiny_Roy
4 Replies
6. Shell Programming and Scripting
Here is the csv file file i have:
ServerName, IPAddress, Gateway, Notes
ServerA, 192.168.1.100, 192.168.1.1, This is some server
ServerB, 192.168.1.110, 192.168.1.1, This is some other server
ServerC, 192.168.1.120, 192.168.1.1, This is some other other server
I would like to have the... (6 Replies)
Discussion started by: Ikon
6 Replies
7. UNIX for Dummies Questions & Answers
So, I have a massive file with thousands of columns
I want a list of the headers in one column in another file.
So I need to strip off the top line (can use head-1)
But how can I convert from this format:
A B C D E F G
to
A
B
C
D
E
F
G (6 Replies)
Discussion started by: polly_falconer
6 Replies
8. Shell Programming and Scripting
Can anyone help.
I have sql to CSV showing header with ALIAS names but I want to generate CSV file with user friendly name i.e from AIAN8 to Adress Book Number etc.
SELECT AIAN8 || , || F0101.ABALPH || , || AICO ||
showing following below in CSV output intead of above
Address... (4 Replies)
Discussion started by: s1a2m3
4 Replies
9. Shell Programming and Scripting
Hi
I need to do some thing like "find and insert before that " in a file which contains many records. This will be clear with the following example.
The original data record should be some thing like this
60119827 RTMS_LOCATION_CDR INSTANT_POSITION_QUERY 1236574686123083rtmssrv7 ... (8 Replies)
Discussion started by: aemunathan
8 Replies
10. Shell Programming and Scripting
Hi All,
I am new to unix Shell scripting
Actually i need to write a shell script to insert data from a dat file to ms-Excel file
The data in the dat file will be like this
Col1 Col2 Col3 Col4
and and
Col5
I a new... (1 Reply)
Discussion started by: kreddy2003
1 Replies