Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Sort command in one column and not effect to another column Post 302784443 by GeodusT on Friday 22nd of March 2013 07:58:54 AM
Old 03-22-2013
@JIM code doesn't work. thank you

@Radoulov your code is work. thank you
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Sort by the third column with +n command

my data.file: 1 2 3 3 2 1 3 5 8 4 9 11 3 3 30 I sort it by the 3rd column: sort -k3b,3 data.file I have : 3 2 1 4 9 11 1 2 3 3 3 30 3 5 8 How can I sort the 3rd column with the +n command? (2 Replies)
Discussion started by: bobo
2 Replies

2. Shell Programming and Scripting

Changing one column of delimited file column to fixed width column

Hi, Iam new to unix. I have one input file . Input file : ID1~Name1~Place1 ID2~Name2~Place2 ID3~Name3~Place3 I need output such that only first column should change to fixed width column of 15 characters of length. Output File: ID1<<12 spaces>>Name1~Place1 ID2<<12... (5 Replies)
Discussion started by: manneni prakash
5 Replies

3. Shell Programming and Scripting

Question about sort specific column and print other column at the same time !

Hi, This is my input file: ali 5 usa abc abu 4 uk bca alan 6 brazil bac pinky 10 utah sdc My desired output: pinky 10 utah sdc alan 6 brazil bac ali 5 usa abc abu 4 uk bca Based on the column two, I want to do the descending order and print out other related column at the... (3 Replies)
Discussion started by: patrick87
3 Replies

4. Shell Programming and Scripting

sort on second column only based on first column

I have an input file like this... AAAlkalines Energizer AAAlkalines Energizer AAAlkalines Energizer AAAlkalines Sunlight AAAlkalines Sunlight AAAlkalines Sunlight AAAlkalines Energizer AAAlkalines Energizer AAAlkalines Energizer AAASalines ... (7 Replies)
Discussion started by: malcomex999
7 Replies

5. Shell Programming and Scripting

Match column 3 in file1 to column 1 in file 2 and replace with column 2 from file2

Match column 3 in file1 to column 1 in file 2 and replace with column 2 from file2 file 1 sample SNDK 80004C101 AT XLNX 983919101 BB NETL 64118B100 BS AMD 007903107 CC KLAC 482480100 DC TER 880770102 KATS ATHR 04743P108 KATS... (7 Replies)
Discussion started by: rydz00
7 Replies

6. Shell Programming and Scripting

command for converting 4 column data to 1 column

dear friends I want to convert four column data to one column data. For example: from 1, 2, 3, 4 5, 6, 7, 8to 1 2 3 4 5 6 7 8what is the general command for that type of convertion. thanks (5 Replies)
Discussion started by: rpf
5 Replies

7. Shell Programming and Scripting

awk command to print only selected rows in a particular column specified by column name

Dear All, I have a data file input.csv like below. (Only five column shown here for example.) Data1,StepNo,Data2,Data3,Data4 2,1,3,4,5 3,1,5,6,7 3,2,4,5,6 5,3,5,5,6 From this I want the below output Data1,StepNo,Data2,Data3,Data4 2,1,3,4,5 3,1,5,6,7 where the second column... (4 Replies)
Discussion started by: ks_reddy
4 Replies

8. Shell Programming and Scripting

Difference of the same column when two other column matches and one column differs less than 1 hour

This is my input file : # cat list 20130430121600, cucm, location,76,2 20130430121600,cucm1,location1,76,4 20130430122000,cucm,location,80,8 20130430122000,cucm1,location1,90,8 20130430140000,cucm1,location1,87,11 20130430140000, cucm,location,67,9 This is the required output ... (1 Reply)
Discussion started by: Lakshmikumari
1 Replies

9. Shell Programming and Scripting

Help with sort First Column followed by Second Column

Input file: DN63688_c0_g1 DN63688_c0_g1_i1 DN71_c0_g1 DN71_c0_g1_i1 DN63688_c0_g1 DN63688_c0_g1_i2 DN63688_c0_g1 DN63688_c0_g1_i3 DN63688_c0_g1 DN63688_c0_g1_i7 DN134_c0_g1 DN134_c0_g1_i1 DN63688_c0_g1 DN63688_c0_g1_i8 DN63688_c0_g1 DN63688_c0_g1_i9 DN63688_c0_g1 ... (3 Replies)
Discussion started by: perl_beginner
3 Replies

10. Shell Programming and Scripting

Use sort to sort numerical column

How to sort the following output based on lowest to highest BE? The following sort does not work. $ sort -t. -k1,1n -k2,2n bfd.txt BE31.116 0s 0s DOWN DAMP BE31.116 0s 0s DOWN DAMP BE31.117 0s 0s ... (7 Replies)
Discussion started by: sand1234
7 Replies
libapache2-mod-perl2-2.0.7::docs::api::Apache2::porting(User Contributed Perl Documentlibapache2-mod-perl2-2.0.7::docs::api::Apache2::porting(3pm)

NAME
Apache2::porting -- a helper module for mod_perl 1.0 to mod_perl 2.0 porting Synopsis # either add at the very beginning of startup.pl use Apache2::porting; # or httpd.conf PerlModule Apache2::porting # now issue requests and look at the error_log file for hints Description "Apache2::porting" helps to port mod_perl 1.0 code to run under mod_perl 2.0. It doesn't provide any back-compatibility functionality, however it knows to trap methods calls that are no longer in the mod_perl 2.0 API and tell what should be used instead if at all. If you attempts to use mod_perl 2.0 methods without first loading the modules that contain them, it will tell you which modules you need to load. Finally if your code tries to load modules that no longer exist in mod_perl 2.0 it'll also tell you what are the modules that should be used instead. "Apache2::porting" communicates with users via the error_log file. Everytime it traps a problem, it logs the solution (if it finds one) to the error log file. If you use this module coupled with "Apache2::Reload" you will be able to port your applications quickly without needing to restart the server on every modification. It starts to work only when child process start and doesn't work for the code that gets loaded at the server startup. This limitation is explained in the Culprits section. It relies heavily on "ModPerl::MethodLookup". which can also be used manually to lookup things. Culprits "Apache2::porting" uses the "UNIVERSAL::AUTOLOAD" function to provide its functionality. However it seems to be impossible to create "UNIVERSAL::AUTOLOAD" at the server startup, Apache segfaults on restart. Therefore it performs the setting of "UNIVERSAL::AUTOLOAD" only during the child_init phase, when child processes start. As a result it can't help you with things that get preloaded at the server startup. If you know how to resolve this problem, please let us know. To reproduce the problem try to use an earlier phase, e.g. "PerlPostConfigHandler": Apache2::ServerUtil->server->push_handlers(PerlPostConfigHandler => &porting_autoload); META: Though there is a better solution at work, which assigns AUTOLOAD for each class separately, instead of using UNIVERSAL. See the discussion on the dev list (hint: search the archive for EazyLife) See Also mod_perl 2.0 documentation. Copyright mod_perl 2.0 and its core modules are copyrighted under The Apache Software License, Version 2.0. Authors The mod_perl development team and numerous contributors. perl v5.14.2 2011-02-08 libapache2-mod-perl2-2.0.7::docs::api::Apache2::porting(3pm)
All times are GMT -4. The time now is 02:06 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy