10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi All,
I have the input as below:
cat input
032016002 2.891 97.109 16.605 27.172 24.017 32.207 0.233 0.021 39.810 0.077 0.026 19.644 13.882 0.131 11.646 0.102 11.449 76.265 23.735 16.991 83.009 8.840 91.160 0.020 99.980 52.102 47.898 44.004 55.996 39.963 18.625 0.121 1.126 40.189... (15 Replies)
Discussion started by: am24
15 Replies
2. Shell Programming and Scripting
OK below is what my sample file looks like. I need to sort by the Primary Key ie: {1:F01SAESVAV0AXXX0466020126} in the first record. Record seperator is $.
I tried sort, but it completely messes it up. I am thinking I will need to use something like awk which understands the record seperator... (6 Replies)
Discussion started by: alfredo123
6 Replies
3. Shell Programming and Scripting
Hi experts,
I need to print the first field first then last two fields should come next and then i need to print rest of the fields.
Input :
a1,abc,jsd,fhf,fkk,b1,b2
a2,acb,dfg,ghj,b3,c4
a3,djf,wdjg,fkg,dff,ggk,d4,d5
Expected output:
a1,b1,b2,abc,jsd,fhf,fkk... (6 Replies)
Discussion started by: 100bees
6 Replies
4. Shell Programming and Scripting
Oracle Enterprise Linux 6
This is my file. Two fields separated by space
$ cat testfile.txt
MARCH9 MARCH4
MARCH1 MARCH5
MARCH2 MARCH326
MARCH821 MARCH7
MARCH6 MARCH2
$
$
The following numeric sort, based on the first field's 6th character works as expected.
$
$ sort -n -k 1.6... (7 Replies)
Discussion started by: John K
7 Replies
5. Shell Programming and Scripting
the below is sorted as it is. the fields that i'm interested in are the 4th and 5th field.
i want to sort the based on the 4th field.
my past attempt to do this was to do something like this:
awk '{print $4}'| awk '{print $1":"$2}' datafile | sort | uniq
however, if i do that, i lose... (2 Replies)
Discussion started by: SkySmart
2 Replies
6. Shell Programming and Scripting
SOLVED : (17 Replies)
Discussion started by: Glitch100
17 Replies
7. Shell Programming and Scripting
Dears,
I need a script or command which can find the unique number from the second filed and against that number it adds the total of first field .
17215630 , 0
907043 ,1
201050 ,10
394149 ,4
1964 ,9
17215630, 0
907043 ,1
201050, 10
394149 ,4
1964 ,9
1234234, 55
23 ,100
33 ,67
... (2 Replies)
Discussion started by: shary
2 Replies
8. Shell Programming and Scripting
Hello,
I have a text file with n lines in the following format (9 column fields):
Example:
contig00012 149606 G C 49 68 60 18 c$cccccacccccccccc^c
I need to count the number of lower-case and upper-case occurences in column 9, respectively, of the... (3 Replies)
Discussion started by: s052866
3 Replies
9. Shell Programming and Scripting
Hi all,
Sorry the title is a mess, but did not find a better description at the time.
So here is my problem:
I have an input file:
8:Mass40s -- 0
48:Mass40s -- 0
67:Mass40s -- 0
86:Mass40s -- 0
105:Mass40s -- 0
9:Mass -- 1
49:Mass -- 86... (5 Replies)
Discussion started by: Alexis Duarte
5 Replies
10. Shell Programming and Scripting
Hello
I am trying to sort on the last field and it seems to have lost ideas on what to do. the file am sorting looks like this
Tan\da\1223
hey\1234
two\three\think\4579
i want to sort on the last fields (1223, 1234 and 4579).
thank you (2 Replies)
Discussion started by: ganiel24
2 Replies