Code Newbie
News     Forums     Search     Members     Sign Up    

My Code Newbie
Username

Password

Articles/Snippets
ASP Classic
ASP.NET
C
C#
C++
HTML / CSS
Java
Javascript
Linux / BSD
Perl
PHP
Python
Ruby
SQL
VB 6
VB.NET

C.N. Friends
  Planet Rome

Link to Us!
Code Newbie
  Code Newbie
    forums
Go Back   Code Forums > Systems > Linux / BSD / OS X
User Name
Password

Reply
 
LinkBack Thread Tools Display Modes
Old 02-21-2006, 03:56 AM   #1 (permalink)
ashok rajagopal
Registered User
 
ashok rajagopal's Avatar
 
Join Date: Sep 2005
Posts: 20
ashok rajagopal is on a distinguished road
Sort command help

I have a data file of 90 characters in each record. I want to sort the file taking in the values from 5th char to the 11th char. The problem is the fields are not separated by space or any delimiter. i have only the character positions. how do i do it ? record will look like this

2005123459080........................678
2005123349080........................678

etc. i want to take in the 6 digits from 5-11th and sort.

want immediate help... please...

thanks in advance.
__________________
ashok rajagopal is offline   Reply With Quote
Old 02-21-2006, 06:47 AM   #2 (permalink)
redhead
Newbie
 
redhead's Avatar
 
Join Date: Jun 2002
Location: Denmark
Posts: 1,680
redhead is on a distinguished road
> sort --key=1.5,1.11
__________________
Don't worry Ma'am, We're university students, We know what We're doing.
-----
If you pull the pin, Mr.Grenade would no longer be your friend.
-----
01000111 01101111 00100000 01000011 00100000 00100001
redhead is offline   Reply With Quote
Old 02-21-2006, 08:11 PM   #3 (permalink)
ashok rajagopal
Registered User
 
ashok rajagopal's Avatar
 
Join Date: Sep 2005
Posts: 20
ashok rajagopal is on a distinguished road
It's working... thanks.
__________________
ashok rajagopal is offline   Reply With Quote
Reply


Thread Tools
Display Modes

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

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Alphabetical Sort? bradleyc Standard C, C++ 10 09-01-2005 01:17 AM
Sort of same as gamehead Androto Standard C, C++ 4 11-18-2004 03:09 PM
sorting objects arrays by object properties sde Java 28 08-05-2004 05:51 AM
Need an alphabetic sort algorithm SkittlesAreYum Java 4 05-08-2003 11:02 PM
sort arrays Apodysophilia Java 9 04-04-2003 06:18 AM


All times are GMT -8. The time now is 12:31 AM.


Powered by vBulletin Version 3.6.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0 RC8





Copyright © 2000-2006, Milano Interactive
Web Hosting provided by Portal 360 Web Hosting
Open Circle