10 More Discussions You Might Find Interesting
1. Homework & Coursework Questions
1. The problem statement, all variables and given/known data:
I'm trying to use a directory path to enter a new directory and sort the files there. I'm using the language C with a system call in Unix to sort the files from smallest to largest.
2. Relevant commands, code, scripts, algorithms:... (1 Reply)
Discussion started by: TedFTW
1 Replies
2. Shell Programming and Scripting
Hello everyone,
I am working on this bash script and I can't seem to get this last part right. It's really trivial but I must not be doing something right. I want to sort files by their size in reverse order (largest to smallest). My script right now sort of tdoes this but there is one file that... (3 Replies)
Discussion started by: tastybrownies
3 Replies
3. Shell Programming and Scripting
Dear all,
I have a complex data file shown below,,,,,
A_ABCD_13208 0 0 4.16735 141044 902449 1293900 168919
C_ABCD_13208 0 0 4.16735 141044 902449 1293900 168919
A_ABCDEF715 52410.9 18598.2 10611 10754.7 122535 252426 36631.4
C_DBCDI_1353 0... (19 Replies)
Discussion started by: AAWT
19 Replies
4. Shell Programming and Scripting
I have the following set of files and I want to order them according to the ascending values of the run:
For example, doing
ls -lrt *drw*.log
gives
n02-z30-sr65-rgdt0p25-dc0p08-4x3drw.log
n02-z30-sr65-rgdt0p25-dc0p03-8x6drw.log
n02-z30-sr65-rgdt0p25-dc0p01-8x6drw.log
... (18 Replies)
Discussion started by: kristinu
18 Replies
5. Red Hat
I am using du -h --max-depth=2 to get list of folders by size upto 2 levels down. Problem is I am not able to sort them in max folder size.
Normally this can be achieved by using du -k | sort -nr * but I can't use it here since it conflicts (the -s argument) with the --max-depth=2 argument.
... (1 Reply)
Discussion started by: rockf1bull
1 Replies
6. Shell Programming and Scripting
i have file a
123
234
456
567
678
and file b
123|xxx|hhh|ppp or zzz
234|rrr|ttt|xxx
432|ttt|mmm|nnn
678|cft|byt|mop
i want to compare file a to file b such that when each of the lines in file a can be found in file b column1 and also xxx or hhh or ppp or zzz can be... (12 Replies)
Discussion started by: blackzinga80
12 Replies
7. Shell Programming and Scripting
hi
i have file like below:
col1,col2,col3,col4
val1,val2,val3,val4
abc1,abc2,abc3,abc4
this is a 4 column file with 3 rows.
i want to sort the file like.. first on col1, then on col2 and so ..on..
i want the sort order to be descending.
Pls help..
Thnks
Sumit (2 Replies)
Discussion started by: sumit207
2 Replies
8. UNIX for Dummies Questions & Answers
I am new to shell scripting
can u guys please provide a small script for the following senario
step1:need to find some files in a directory for ex having 020908
step2:sort them and redirecting to new file
(ex:sort abc > abc.sort)
i am trying this but giveing flag error
ls -l... (4 Replies)
Discussion started by: cgreddy2020
4 Replies
9. Shell Programming and Scripting
Hi,
I have one file stat.
Stat file contents are as follows: for example.
H50768020040913,00260100,507680,13,0000000643,0000000643,00000,0000
H50769520040808,00260100,507695,13,0000000000,0000000000,00000,0000 H50770620040611,00260100,507706,13,0000000000,0000000000,00000,0000
Now i... (1 Reply)
Discussion started by: davidpreml
1 Replies
10. Shell Programming and Scripting
Hi,
What is the command for sorting files according to their size
Thanx in advance (4 Replies)
Discussion started by: sendhil
4 Replies