10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi,
input:
line1|error_type_a@15
line1|error_type_c@10
line1|error_type_b@5
line2|error_type_f@3
line2|error_type_a@1
I would need to place all the second fields with common first field on the same line, BUT with sorted error position number:
line1|error_type_b@5; error_type_c@10;... (5 Replies)
Discussion started by: beca123456
5 Replies
2. Shell Programming and Scripting
I have a flatfile A.txt
2012/12/04 14:06:07 |trees|Boards 2, 3|denver|mekong|mekong12
2012/12/04 17:07:22 |trees|Boards 2, 3|denver|mekong|mekong12
2012/12/04 17:13:27 |trees|Boards 2, 3|denver|mekong|mekong12
2012/12/04 14:07:39 |rain|Boards 1|tampa|merced|merced11
How do i sort and get... (3 Replies)
Discussion started by: sabercats
3 Replies
3. Shell Programming and Scripting
Hi,
I am unable to sort data on the first field
$cat t
Jim,212121,Seattle
Bill,404404,Seattle
Steve,246810,Nevada
Scott,212277,LosAngeles
Jim,212121,Ohio
sort -t"," -k1,2 t
Bill,404404,Seattle
Jim,212121,Ohio
Jim,212121,Seattle
Scott,212277,LosAngeles
Steve,246810,Nevada (7 Replies)
Discussion started by: Shivdatta
7 Replies
4. Shell Programming and Scripting
Hi all,
I have two large files and i want a field by field comparison for each record in it.
All fields are tab seperated.
file1:
Email SELVAKUMAR RAMACHANDRAN
Email SHILPA SAHU
Web NIYATI SONI
Web NIYATI SONI
Email VIINII DOSHI
Web RAJNISH KUMAR
Web ... (4 Replies)
Discussion started by: Suman Singh
4 Replies
5. Shell Programming and Scripting
I have a file in which "-"(by itself and nothing else) occurs in different fields in each record(sometimes in the 3 field, sometime in the 20th field, some time in the 100th field....etc). Also there are field of the format "abc-def". How do I replace fields that have just "-" with number zero. sed... (4 Replies)
Discussion started by: akshaykr2
4 Replies
6. Shell Programming and Scripting
Hi,
I have a set of columns in a csv file, my first row being an integer and 2nd being a date. I want to first sort it using the first column and then by the second.
for e.g. i have ,
1234,09/05/2009,hi
5678,01/01/2008,hi
1234,11/03/2006,hello
5678,28/07/2010,hello
i tried this... (5 Replies)
Discussion started by: sweta_doshi
5 Replies
7. Shell Programming and Scripting
I want to sort alphabetically on the first field and sort in descending numerical order on the 2nd field. With a normal "sort -r -n" it does this:
abc ||| 5e-05 ||| bla
abc ||| 3 ||| ble
def ||| 1 ||| abc
def ||| 0.2 ||| def
As you can see it ignores the fact that 5e-05 is actually 0.00005... (1 Reply)
Discussion started by: FrancoisCN
1 Replies
8. Shell Programming and Scripting
:cool:
Hi all,
I have a pecular issue in sorting these files in Solaris environment.
All the below files are modified on November 4th, but I want to sort these files as per date column (eg: 01May07_1623 = ddmmmyy_hhmm)
Nov 4 18:27 SONYELEC00.GI22973.01May07_1623.gpg
Nov 4 18:27... (4 Replies)
Discussion started by: shivaastrogun
4 Replies
9. Shell Programming and Scripting
hello,
i have a table contain many columns delimited by blank.
i want to sort this table by the 2 columns and 3 one and i want to keep the first line inchanged?
how can i do using the sort command?
thanks
table like :
field1 field2 field3 field4
x y z b
t h r n
.. (4 Replies)
Discussion started by: kamel.seg
4 Replies
10. UNIX for Dummies Questions & Answers
I'm running against a file with 1008 records like this, all beginning '4760 Slave':
4760 Slave,7,3607 ,GL ,200605,11320024 , ,GBP ,X00033
,AI80190 ... (1 Reply)
Discussion started by: miwinter
1 Replies