The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Need to sort/change modify 2300 users ... tresani UNIX for Dummies Questions & Answers 1 08-06-2008 02:14 AM
How to Sort?? Pls help!! kn.naresh Shell Programming and Scripting 1 05-15-2008 06:23 AM
sort mirusnet Shell Programming and Scripting 2 01-27-2008 02:27 PM
sort help unics Shell Programming and Scripting 14 04-30-2007 07:28 AM
sort thumsup9 UNIX for Dummies Questions & Answers 2 08-27-2005 11:41 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 09-18-2008
dnat dnat is offline
Registered User
  
 

Join Date: Jan 2007
Posts: 40
sort change

Hi

i have a code where there is a sort command.

but i am not able to understand what it does. (checked the man page but it is too confusing)


cut -c 1-5,19-32,45-57 input.dtl| sort -c -T /temp/sorts -y +0.19 -0.32 +0.5 -0.19 +0.0 -0.5

can some one pls help
  #2 (permalink)  
Old 09-18-2008
era era is offline Forum Advisor  
Herder of Useless Cats (On Sabbatical)
  
 

Join Date: Mar 2008
Location: /there/is/only/bin/sh
Posts: 3,652
The +0.19 -0.32 says to use the characters 19-32 (apparently, the third field you cut) as the primary sort key. The following pair of +0.5 -0.19 use the second field, and the remainder uses the third field as the tertiary sort key. Finally, the -c instructs sort to simply report on whether the input is sorted or not.

Can't quickly find documentation for -y or -T, which platform are you on? Anyway, I'm guessing these are documented adequately on the manual page (speculate -T says where to store temporary output and -y is case-insensitive).
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 02:38 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0