I need to do some section/group sorting. At the moment, I get around it by grep group by group and then re-directing to the same 'final' output file.
Below is what's been sorted so far based on the second field
I want to sort the above so that the output will be as below. Let's refer to this as the final output. final.txt file.
Because I don't know how to produce the final output using awk or sort. What I did instead is run several of the commands below, grepping for the string DEVELOPMENT, PRODUCTION and so on
Perhaps someone know a trick or too on how to do it a lot better. I don't see how using sort only will be able to do this. Advise much appreciated. Thanks.
Please be aware that most if not all of that awking, greping, uniqing can be doen in one single awk only, and some awk version even offer a sort functionality.
Should you post a representative input and a desired output sample, people in here might come up with a solution taylored to your problem.
I'm trying to return only one row with the highest value for PCT_MAX_USED. Any suggestions?
When I add this code, I get the ORA-00937 error.
trunc(max(decode( kbytes_max, 0, 0, (kbytes_alloc/kbytes_max)*100))) pct_max_used
This is the original and returns all rows.
select (select... (3 Replies)
Hi Everyone,
I have below record set. File is fixed widht file
101newjersyus 20150110
101nboston us 20150103
102boston us 20140106
102boston us 20140103
I need to group record based on first 3 letters in our case(101 and 102)
and sort last 8 digit in ascending order and print only... (4 Replies)
I have an input file that contains the primary and secondary groups a user should have based on a pre-defined role. The input file looks like this:
<user_login>|<comment_field>|<role>
After I execute my script to do some grepping I have the following user file where the secondary groups are... (10 Replies)
I've this file and need to sort the data in each group
File would look like this ...
cat file1.txt
Reason : ABC
12345-0023
32123-5400
32442-5333
Reason : DEF
42523-3453
23345-3311
Reason : HIJ
454553-0001
I would like to sort each group on the last 4 fileds and print them... (11 Replies)
Hi all,
I'm running a command on an ESXi server and the output for multipath device info is not in order. Can any of you SED or AWK gurus show me how I might sort the sectional data where both LUN paths are in order?
Output:
... (3 Replies)
Hi All
I do have a file like this with 6 columns. Groups of data merge together and the group number is indicated above each group.
1
1 12 26 289 3.2e-027 GCGTATGGCGGC
2 12 26 215 6.7e+006 TTCCACCTTTTG
3 9 26 175 ... (1 Reply)
I have a file in the following format. Groups of data merge together and the group number is indicated above each group.
1
adrf
dfgr
dfg
2
dfgr
dfgr
3
dfef
dfr
fd
4
fgrt
fgr
fgg
5
fgrt
fgr (3 Replies)