HP9000-L Archives

November 2013

HP9000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Olav Kappert <[log in to unmask]>
Reply To:
Date:
Thu, 7 Nov 2013 16:32:19 -0500
Content-Type:
text/plain
Parts/Attachments:
text/plain (37 lines)
I would like to know the background for how the Unix sort works with keys.

The cmd is   ---  sort -t \& -o outfile -k 1.1,1.12 filea fileb  ---

where filea and fileb are the input files and they are both 80 bytes in 
length or in the unix world as byte stream.

Since there is no "&" character in the file, it will treat the whole 
record as one field.

When looking at the data, it seems that the key was actually extended 
for the length of the record or data while it should only be looking at 
the 12 bytes in the key.

This behavour is counter to the chronical order of the information 
placed in the file.

Does anyone have a solution as to how to sort/merge the files and retain 
the chronical order otherwise ?

~~~~~
Just to make it interesting I also get the following message:

    sort: Warning: A newline character was added to the end of the input.

for each record sorted/merged.

Why and how do you get rid of this message other than redirecting it to 
$null.

Olav.

*******
To unsubscribe, click the following link:
http://raven.utc.edu/scripts/WA.EXE?SUBED1=HP9000-L
*******

ATOM RSS1 RSS2