10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Could you please advise on the following: I have two space-delimited files with 9 and 10 columns, respectively, with exactly the same values in column 1. However, the order of column 1 differs between the two files, so I want to sort both files by column 1, so that I can align them and... (6 Replies)
Discussion started by: aberg
6 Replies
2. Shell Programming and Scripting
I am working on converting shell to Perl script. In shell we have built in function
trap
Do you know alternative in Perl or actually we don't need it?
Thanks for contribution (3 Replies)
Discussion started by: digioleg54
3 Replies
3. Shell Programming and Scripting
Hello there
i have a funny behiavor of the sort fonction, i try it out on different Solaris machine and i have the same issue.
So i would like to see if there is a rationel explanation
here is some data in a file:test.txt
,Test,RSD,RSD_Asset
,Test,RSD,RSD_Credit
,Test,RSD,RSD_Liab... (3 Replies)
Discussion started by: kykyboss
3 Replies
4. Programming
Hi,
Can anyone tell me why the following program is giving compiler error when I use a friend function of a class as the comparison predicate for the third parameter of std::sort() algorithm? How to correct it, keep the 'friend' intact?
#include <iostream>
#include <vector>
#include <list>... (1 Reply)
Discussion started by: royalibrahim
1 Replies
5. Homework & Coursework Questions
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
I must write a shell script that calls two external Perl functions--one of which sorts the data in a file, and... (6 Replies)
Discussion started by: kowit010
6 Replies
6. Homework & Coursework Questions
1. The problem statement, all variables and given/known data:
To sort a data
2. Relevant commands, code, scripts, algorithms:
The data provided is saved in dummy.txt and provided in LIBSVM format, but I think this information is redundant..
+1 1:2 2:4 4:3.2
-1 2:2.1 2:2.1 ... (4 Replies)
Discussion started by: eeweepoh
4 Replies
7. Shell Programming and Scripting
Hi,
can I sort the fields on the basis of dates in the following format?
from this
Dec 17 2007 2:18:18:000PM
Dec 17 2007 5:18:18:000AM
Jan 19 2009 4:30:02:000AM
Mar 21 2010 9:13:55:000AM
Dec 16 2007 4:29:21:000PM
Dec 24 2009 12:29:23:000PM
to
Dec 16 2007 4:29:21:000PM... (2 Replies)
Discussion started by: shellwell
2 Replies
8. Shell Programming and Scripting
Hi
Is there any way I could reproduce the following code in perl 5.8:
sort -u FILE | sort -t: -k1,1 -k2n
which sorts by unicity first, then by first key, then by second key in numeric format.
What I have now is
@sort_array=uniq sort @sort_array;
after the contents of my... (5 Replies)
Discussion started by: Indalecio
5 Replies
9. Shell Programming and Scripting
Hi,
I am new to PERL.I want to sort all the lines in a file based on 1,2 and 4th filelds.
Can U suggest me a command/function in perl for this operation.. (5 Replies)
Discussion started by: karthikd214
5 Replies
10. Programming
do any one knows where i can find an implementation in c for the sort function (2 Replies)
Discussion started by: dbargo
2 Replies