9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I have some data like below:
John 254
Chris 254
Matt 123
Abe 123
Raj 487
Moh 487
How can i print it using awk to have:
254 John,Chris
123 Matt,Abe
487 Raj,Moh
Thanks. (4 Replies)
Discussion started by: james2009
4 Replies
2. Shell Programming and Scripting
I am trying to re-format a .csv file using awk. I have 6 fields in the .csv file. Some of the fields are enclosed in double quotes and contain comma's inside the quotes. awk is breaking this into multiple fields.
Sample lines from the .csv file:
Device Name,Personnel,Date,Solution... (1 Reply)
Discussion started by: jxrst
1 Replies
3. UNIX for Dummies Questions & Answers
Hi,
I have a large number of files which are written as csv (comma-separated values).
Does anyone know of simple sed/awk command do achieve this?
Thanks!
---------- Post updated at 10:59 AM ---------- Previous update was at 10:54 AM ----------
Guess I asked this too soon. Found the... (0 Replies)
Discussion started by: lost.identity
0 Replies
4. Shell Programming and Scripting
Hi All,
I need to grep through a file for a string and print the next ten lines to a file separating the lines with a , and save it as a csv file to open it as a XL file. The 10 lines should be on a sigle row in xl.
Any suggesstions please.
Note; I dont have a GNU Grep to use -A flag.
... (6 Replies)
Discussion started by: Nani369
6 Replies
5. Shell Programming and Scripting
Hi.
I have a tab separated file that has a couple nearly identical lines. When doing:
sort file | uniq > file.new
It passes through the nearly identical lines because, well, they still are unique.
a)
I want to look only at field x for uniqueness and if the content in field x is the... (1 Reply)
Discussion started by: rocket_dog
1 Replies
6. Shell Programming and Scripting
I need to arrange output of SQL query into a comma separated format and I'm struggling with processing the output...
The output is something like this:
<Attribute1 name><x amount of white spaces><Atribute value>
<Attribute2 name><x amount of white spaces><Atribute value>
<Attribute3... (2 Replies)
Discussion started by: Juha
2 Replies
7. Shell Programming and Scripting
Hi People !!
I need your help.
I have a a txt file "example" with it datas.
11:35 10/12/2003 10.10.10.1 God.com 5 country Responsable of ASN
11:37 12/12/2003 10.10.10.1 FATHER.COM 5 country Responsable of ASN
11:40 14/12/2003 10.10.10.3 www.mother 6... (6 Replies)
Discussion started by: ras
6 Replies
8. Shell Programming and Scripting
Hi,
I need help in printing out the dates with the largest value in front of it using awk.
436 28/Feb/2008
436 27/Feb/2008
436 20/Feb/2008
422 13/Feb/2008
420 23/Feb/2008
409 21/Feb/2008
402 26/Feb/2008
381 22/Feb/2008
374 24/Feb/2008
360... (7 Replies)
Discussion started by: SIFA
7 Replies
9. Shell Programming and Scripting
Hi,
I am looking for a way to find a particular word in a file then print a line that precedes this line, as well as this line.
Sometimes in a log file there is only one word per line and I need to print one of the lines leading up to the single worded line.
Example - I can grep for ouch... (5 Replies)
Discussion started by: g_jumpin
5 Replies