It is nice to know that what you are doing isn't working, but if we don't know what you are trying to do it is hard to guess at how to fix it.
You are currently taking multiple lists of files sorted by decreasing file size and then sorting them together in reverse alphanumeric order.
What are you trying to do?
It is also a good idea to tell us what operating system and shell you're using.
Does one of the following come close to what you're trying to do?
(which gives you each of your directories with files within each directory sorted by decreasing size) or:
(which gives you all of the files in all of those directories in one list sorted by decreasing size).
I'm stumped on the point of sorting the file at the end. The first line you write to identify the file will be very unlikely to stay with the content, and the content itself may not stay in order either.
What are you trying to achieve? There is probably a far neater way to achieve it as Don alludes to, but we would need to know what inputs/files you have and what is the required output.
For instance:-
Quote:
I have three directories (for testing) dir-a, dirb and dir-c
They all contain separate files file-a, file-b & file-c respectively
Each file contains my data.
The output I want is:-
You would be best to tell us which bits need to be sorted (reverse) and which bits need to remain as they are.
I'm sure we can help if we fully understand the problem.
It is not a question of what I do not like, What I am trying to do is quite elementary in a lot of other languages. I want the written output contained in the summary.txt listed in reverse alphabetical (going from Z at the top to A at the bottom) as I wrote in the above example. As it stands the summary.txt files contents are are not listed in this manner and I cannot find a method thus far to do so
Hello,
I have a large database of words and would like them sorted in reverse order i.e. from the end up.
An example will make this clear:
I have tried to write a program in Perl which basically takes the string from the end and tries to sort from that end but it does not seem... (5 Replies)
Hi,
I want to print the item in reverse order such that the output would look like
00 50 50 23 40 22 02 96
Below is the input:
00 05 05 32 04 22 20 69
Video tutorial on how to use code tags in The UNIX and Linux Forums. (5 Replies)
command/script(apart from awk) to print the fields in reverse order
that is last field has to come first and so on and first field has to go last
Input
store-id date sale
.............
.............
... (3 Replies)
Hi Everyone,
I have one a.txt:
a b 001 c
b b 002 c
c c, not 002 c
The output should be
001
002
002
If i use cut -f 3 -d' ', this does not work on the 3rd line, so i thought is any way to cut the field counting from the end? or any perl thing can do this?:confused:
... (3 Replies)
I need to sort the particular column only in reverse order how i can give it..
if i give the -r option the whole file is getting sorted in reverse order.
1st 2nd col 3rd
C col 4th col 5th col
-------------------------------------------
C... (7 Replies)
I a file with log entries... I want to sort it so that the last line in the file is first and the first line is last..
eg.
Sample file
1
h
a
f
8
6
After sort should look like
6
8
f
a
h
1 (11 Replies)