Hey,
So I'm having issues sorting a data set.
The data set contains entries as such;
I now want to sort this file according to the name of the athlete's, however, I don't want to sort it alphabetically but according to the number of names the athletes have. So for instance, I would like to sort the entire document starting with the entries of all the athletes that have 2-word names, then all the athletes with 3-word names and so on. Is this possible using sort?
I have tried various commands;
But I haven't managed to sort the data in the way I want it.
Does anyone know what I'm doing wrong?
Thanks in advance for your help.
hello,
I have a file as follows:
F0100010 A C F0100040 A G BTA-28763-no-rs 77.2692
F0100020 A G F0100030 A T BTA-29334-no-rs 11.4989
F0100030 A T F0100020 A G BTA-29515-no-rs 127.006
F0100040 A G F0100010 A C BTA-29644-no-rs 7.29827
F0100050 A... (9 Replies)
Hi,
I have two types of file names
filename1_12345 or filename1-12345 at the same time I have second type
filename2-12345 in a txt file.
I am trying to write awk script that will sort these names with below pattern
ALL file names like
filename1_12345 and filename1-12345 will go to... (1 Reply)
Hi
I have some files in directory and the names of files are like
jnhld_15233_2010-11-23
jnhld_15233_2007-10-01
jnhld_15233_2001-05-04
jnhld_15233_2011-11-11
jnhld_15233_2005-06-07
jnhld_15233_2000-04-01
..etc
How can i sort these files based on the date in the file name so that ... (4 Replies)
Hello all,
Is there a way to sort only one column while keeping everything else intact. Take for example this situation: (all columns are space separated)
11 AA asdf 1 -0.5 xx
11 AA axdf 1 -0.6 xx
11 AA csls 1 -0.7 xx
11 AA hjkj 1 -0.4 xx
11 AA uius 1 -0.8 xx
22 AA asdf 1 -0.4 xx
22 AA... (7 Replies)
Hi All,
I'm looking for a script which can transpose field names from column headers to values in one column.
for example, the input is:
IDa;IDb;IDc;PARAM1;PARAM2;PARAM3;
a;b;c;p1val;p2val;p3val;
d;e;f;p4val;p5val;p6val;
g;h;i;p7val;p8val;p9val;
into the output like this:
... (6 Replies)
Hi,
I am new to shell scripting, i have requirement can any one help me out in this regrads,
in directory i have file like invoice1.txt, invoice2.txt in each file i have fixed number of columns, 62 in number but they are randomly arranged.like
for first file invoice1.txt can have columns... (5 Replies)
How do I sort the output of ls
rfc1.txt
rfc2.txt
rfc30.txt
rfc17.txt
rfc10.txt
rfc3.txt
rfc22.txt
rfc44.txt
rfc20.txt
and put it in order like this…..
rfc1.txt
rfc2.txt
rfc3.txt
rfc10.txt
rfc17.txt
rfc20.txt
rfc22.txt (2 Replies)
If the 4th column has - sign then the names in 3rd column has to change to some user defined names (as shown in output).
Thanx
input1
1 a aaaaa +
2 b bbbbb +
3 c ccccc +
4 d ddddd +
5 e eeeee +
6 f xxxxx +
8 h hhhhh +... (8 Replies)
hi all,
is there an easy way in ksh to sort the results of a find in say alphabetical order ?? e.g in my script i am doing a find for all servers
find . -name "server.xml"
and the output is not in any order.
thanks in advance. (4 Replies)
Hi All,
Can anyone tell me how to sort data in a file using the “sort” command? Note that the records in the data file are not separated into fields. I know only the column positions of the data on which sorting should be done. For example say I've to sort based on the data present in between... (1 Reply)