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
Hi Experts,
I have a filelist collected from another server , now want to sort the output using date/time stamp filed.
- Filed 6, 7,8 are showing the date/time/stamp.
Here is the input:
#----------------------------------------------------------------------
-rw------- 1 root ... (3 Replies)
Discussion started by: rveri
3 Replies
3. Shell Programming and Scripting
Input file:
100%ABC2 3.44E-12 USA
A2M%H02579 0E0 UK
100%ABC2 5.34E-8 UK
100%ABC2 3.25E-12 USA
A2M%H02579 5E-45 UK
Output file:
100%ABC2 3.44E-12 USA
100%ABC2 3.25E-12 USA
100%ABC2 5.34E-8 UK
A2M%H02579 0E0 UK
A2M%H02579 5E-45 UK
Code try:
sort -k1,1 -g -k2 -r input.txt... (2 Replies)
Discussion started by: perl_beginner
2 Replies
4. 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
5. 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
6. 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
7. UNIX for Advanced & Expert Users
Hello all -
I am to this forum and fairly new in learning unix and finding some difficulty in preparing a small shell script. I am trying to make script to sort all the files given by user as input (either the exact full name of the file or say the files matching the criteria like all files... (3 Replies)
Discussion started by: pankaj80
3 Replies
8. 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
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. Shell Programming and Scripting
Hi,
here is my perl script.This script creates an array and is sorting it using the in-built sort function in perl.
#!/usr/local/bin/perl
my number=6;
my @num_arr=(1,2,3,4,5);
my @array=(23,"$number","Hello",2.345,@num_arr);
#printing the array
print... (2 Replies)
Discussion started by: DILEEP410
2 Replies