Sponsored Content
Top Forums UNIX for Advanced & Expert Users Sort command - strange behaviour Post 302199879 by miwinter on Wednesday 28th of May 2008 05:10:57 AM
Old 05-28-2008
Thanks for the uber-fast reply Krish. I looked at the key definition thing (k switch) but it didn't seem to to work either. Using what you gave does the right thing, only, when I transpose that command to use on my live data, it doesn't. Here's an example (first 10 lines out of the newly sorted file):

sort -t";" rk2,2 mwreport_joined.txt > mwreport_sorted.txt

GLMLRP_ComparisonJob;989:13:42
GLMLRP_Diff_HighlighterJob;989:08:56
AD046;988:44:15
GleamMIPostCanadaExtractJob;9196:53:12
GleamMIAGREERepAllBackOutJob;9025:39:12
GleamMIAGREEProdFacilCombJob;9025:29:36
GleamMIAGREEExcRateHistExtractJob;9025:21:26
GleamMIAGREEDynamicParamJob;9025:19:10
GleamMIAGREEClassExtractJob;9025:11:35
GleamMIAGREEClassPODLoadJob;9025:09:43

As you can see above, the "9196:53:12" value in the fourth record should be top of the list as it is the largest numerically
 

10 More Discussions You Might Find Interesting

1. Linux

/etc/passwd strange behaviour!

Hi there, first of all, here is my conf of a uname -a Linux SAMBA 2.4.18-4GB #1 Wed Mar 27 13:57:05 UTC 2002 i686 unknown on a fedora machine. Here is my problem: every once in a while, the line containing root disappears in the /etc/passwd, disabling all logging on my server. Any one have... (0 Replies)
Discussion started by: penguin-friend
0 Replies

2. Shell Programming and Scripting

Help me to resolve uncertian behaviour of a sort command

I have got a file BeforeSort.txt having 40 fields seperated by "|" First field= RecordType (Value will be P or FP) Second field= CamCode Third field = UpdatingDate Fourth field = ProductType Fifth field = ActionCode (Value may be 01, 02 or 03) Sixth field = ProductCode and so on My... (1 Reply)
Discussion started by: pankajrai
1 Replies

3. UNIX for Dummies Questions & Answers

a strange message when executing the sort command

Dear all, when I issue the command: gunzip -c file.gz |sort the command is executed normally and correctly but a message keeps appearing everytime I run the command: the message: sort: missing NEWLINE added at end of input file STDIN Does anyone know what is the meaning of this message?... (3 Replies)
Discussion started by: marwan
3 Replies

4. Shell Programming and Scripting

A Strange Behaviour!!!

Can some-one give me a view to this : I have a directory in an unix server, having permissions r-xr-xr-x .This directory is basically a source directory. Now there is another directory basically the destination directory which has all the permissions. Note:I log in as not the owner,but user... (5 Replies)
Discussion started by: navojit dutta
5 Replies

5. UNIX for Advanced & Expert Users

Strange sed behaviour

$ echo a.bc | sed -e "s/\|/\\|/g" |a|.|b|c| $ Is the behavior of the sed statement expected ? Or is this a bug in sed ? OS details Linux 2.6.9-55.0.0.0.2.ELsmp #1 SMP Wed May 2 14:59:56 PDT 2007 i686 i686 i386 GNU/Linux (8 Replies)
Discussion started by: vino
8 Replies

6. UNIX for Dummies Questions & Answers

Strange Program behaviour

Had a strange thing going on with my code. It's ok I figured it out for myself.... (2 Replies)
Discussion started by: mrpugster
2 Replies

7. Shell Programming and Scripting

strange behaviour from sed???

Hi all, I want to do a very simple thing with sed. I want to print out the line number of a disk I have defined in /etc/exports, so I do: It's all good, but here's the problem. When I define md0 in a variable, I get nothing from sed: Why is that? can anybody please help? Thanks (2 Replies)
Discussion started by: alirezan
2 Replies

8. Red Hat

Crontab strange behaviour

Hi all, I'm having this scenario which for the moment I cannot resolve. :( I wrote a script to make a dump/export of the oracle database. and then put this entry on crontab to be executed daily for example. The script is like below: cat /home/oracle/scripts/db_backup.sh #!/bin/ksh ... (3 Replies)
Discussion started by: enux
3 Replies

9. Shell Programming and Scripting

Strange "cut" command's behaviour

Hi, Suppose if I have a file having data like this: $ cat file.txt A B C D And, if I do a cut operation like this: $ cut -d" " -f2 file.txt The output is A C D This is the same for even if we try to get the field 3 with -f3 (assume line 2 has 3 fields : C E F). The above... (1 Reply)
Discussion started by: royalibrahim
1 Replies

10. UNIX for Dummies Questions & Answers

linux sort command produces strange output

cat a .a ba .b bb .c bc sort a .a .b ba bb bc .c NOTE: .a and .b appears before ba and bb, where as .c appears after bc. In general (3 Replies)
Discussion started by: ajb
3 Replies
Bio::SearchIO::gmap_f9(3pm)				User Contributed Perl Documentation			       Bio::SearchIO::gmap_f9(3pm)

NAME
Bio::SearchIO::gmap_f9 - Event generator for parsing gmap reports (Z format) SYNOPSIS
# Do not use this object directly - it is used as part of the # Bio::SearchIO system. use Bio::SearchIO; my $searchio = Bio::SearchIO->new(-format => 'gmap', -file => 't/data/her2.gmapz'); while( my $result = $searchio->next_result ) { while( my $hit = $result->next_hit ) { while( my $hsp = $hit->next_hsp ) { # ... } } } DESCRIPTION
This object encapsulated the necessary methods for generating events suitable for building Bio::Search objects from a GMAP "compressed" report (from gmap run with -Z flag) Read the Bio::SearchIO for more information about how to use this. REVERSE STRAND AND BIOPERL COORDINATES I believe that I'm doing the correct thing when reporting hits on the negative strand of the genome. In particular, I've compared the "exons" this code generates with the set returned by ncbi's megablast web service. NCBI's hsp's are ordered differently and have a different genomic location (off by ~18,000,000 bases, padding?) but the starts, ends, and lengths were similar and my strand handling matches theirs. E.g. CDNA GENOME start end strand start end strand blast 1913 2989 1 86236731 86237808 -1 1 475 1 86260509 86260983 -1 1510 1727 1 86240259 86240476 -1 841 989 1 86243034 86243182 -1 1381 1514 1 86240630 86240763 -1 989 1122 1 86242457 86242590 -1 599 729 1 86247470 86247600 -1 473 608 1 86259972 86260107 -1 1255 1382 1 86240837 86240964 -1 730 842 1 86244040 86244152 -1 1813 1921 1 86238123 86238231 -1 1725 1814 1 86239747 86239836 -1 1167 1256 1 86241294 86241383 -1 1120 1188 1 86242319 86242387 -1 gmap 1 475 1 104330509 104330983 -1 476 600 1 104329980 104330104 -1 601 729 1 104317470 104317598 -1 730 841 1 104314041 104314152 -1 842 989 1 104313034 104313181 -1 990 1121 1 104312458 104312589 -1 1122 1187 1 104312320 104312385 -1 1188 1256 1 104311294 104311362 -1 1257 1382 1 104310837 104310962 -1 1383 1511 1 104310633 104310761 -1 1512 1726 1 104310260 104310474 -1 1727 1814 1 104309747 104309834 -1 1815 1917 1 104308127 104308229 -1 1918 2989 1 104306731 104307802 -1 FEEDBACK
Mailing Lists User feedback is an integral part of the evolution of this and other Bioperl modules. Send your comments and suggestions preferably to the Bioperl mailing list. Your participation is much appreciated. bioperl-l@bioperl.org - General discussion http://bioperl.org/wiki/Mailing_lists - About the mailing lists Reporting Bugs Report bugs to the Bioperl bug tracking system to help us keep track of the bugs and their resolution. Bug reports can be submitted via the web: https://redmine.open-bio.org/projects/bioperl/ AUTHOR - George Hartzell Email hartzell@alerce.com CONTRIBUTORS
Additional contributors names and emails here APPENDIX
The rest of the documentation details each of the object methods. Internal methods are usually preceded with an underscore (_). next_result Title : next_result Usage : $result = stream->next_result Function: Reads the next ResultI object from the stream and returns it. Returns : A Bio::Search::Result::ResultI object Args : n/a perl v5.14.2 2012-03-02 Bio::SearchIO::gmap_f9(3pm)
All times are GMT -4. The time now is 04:22 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy