10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I have an input file that I have sorted in a previous stage by $1 and $4. I now need something that will take the first record from each group of data based on the key being $1
Input file
1000AAA|"ZZZ"|"Date"|"1"|"Y"|"ABC"|""|AA
1000AAA|"ZZZ"|"Date"|"2"|"Y"|"ABC"|""|AA... (2 Replies)
Discussion started by: Ads89
2 Replies
2. Shell Programming and Scripting
Hi
I have a file as below
<field1> <field2> <field3> ... <field_num1> <field_num2>
Trying to sort based on difference of <field_num1> and <field_num2> in desceding order and print all fields.
I tried this and it doesn't sort on the difference field .. Appreciate your help.
cat... (9 Replies)
Discussion started by: newstart
9 Replies
3. UNIX for Dummies Questions & Answers
I would like to print unique lines without sort or unique. Unfortunately the server I am working on does not have sort or unique. I have not been able to contact the administrator of the server to ask him to add it for several weeks. (7 Replies)
Discussion started by: cokedude
7 Replies
4. Shell Programming and Scripting
I have another file with three columns A,B,C as below
123,1,502
123,2,506
123,3,702
234,4,101
235,5,104
456,6,104
456,7,100
i want to sort such that i get a unique value in column A, and for those with multiple value in A, i want the lowest value in C.
output should be
Code:... (3 Replies)
Discussion started by: dealerso
3 Replies
5. Shell Programming and Scripting
I have a file with contents below
123,502
123,506
123,702
234,101
235,104
456,104
456,100
i want to sort such that i get a unique value in column A, and for those with multiple value in A, i want the lowest value in B.
output should be
123,502
234,101
235,104
456,100 (3 Replies)
Discussion started by: dealerso
3 Replies
6. Shell Programming and Scripting
Input file
---------
12:name1:|host1|host1|host2|host1
13:name2:|host1|host1|host2|host3
14:name3:
......
Required output
---------------
12:name1:host1(2)|host1(1)
13:name2:host1(2)|host2(1)|host3(1)
14:name3:
where (x) - Count how many times field appears in last column
... (3 Replies)
Discussion started by: greycells
3 Replies
7. Shell Programming and Scripting
Hello All
I have data in a flat file with numeric and aplha numeric datatypes.
Now i have to sort on multiple fileds.
Can any body please give me the sort code?
i am particularly confused about the sort code like
sort -n +0 -1 +1 -2 .... (1 Reply)
Discussion started by: vasuarjula
1 Replies
8. Shell Programming and Scripting
hello all
I have a file names xxx with data like
1,2,3,12
1,3,6,12
1,3,5,12
2,4,6,12
6,5,6,12
4,2,7,12
4,1,3,12
I wish to sort this file xxx on first three fields in ascending order.
OUPUT should be like
1,2,3,12
1,3,5,12
1,3,6,12
2,4,6,12 (4 Replies)
Discussion started by: vasuarjula
4 Replies
9. UNIX for Dummies Questions & Answers
Hello. I've read a few threads on how to sort on multiple fields, but I still can't get my file to sort correctly.
I have a comma delimited .csv file will over a hundred fields. I want to sort it by field 2, field 62 and then field 61 (integer fields).
input looks like this well swap field... (2 Replies)
Discussion started by: happy_cow
2 Replies
10. Shell Programming and Scripting
Hi,
May I know, if a pipe separated File is large, what is the best method to calculate the unique row count of 3rd column and get a list of unique value of the 3rdcolum?
Thanks in advance! (20 Replies)
Discussion started by: deepakwins
20 Replies