tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
From: bboddy - Bill Boddy <BBODDY () acxiom ! co ! uk>
To: tru64-unix-managers
Subject: SUMMARY: head vs more
Date: Fri, 28 Jan 2000 09:12:23 +0000	[thread overview]
Message-ID: <96079334819100.tru64-unix-managers.marc@archive.invalid> (raw)


Thanks to:-

Joerg Bruehe
Jerome Berkman
Thomas Payerle
Gary George
Arrigo Triulzi
Dr. Tom Blinn
Walter North
Niels Korkholm
Oisin McGuiness
Larry Garrett
And
Nikola Milutinovic

Who all , in one way or another explained ......


Well, if you take a closer look, you'll see:
	> 0000000    1   0   0   0   0   2   9   2   |   P   G   7   4   7
0   |

then a "cr" character - "cr" stands for "Carriage Return". Then another
sequence followed by "nl" - which stands for "New Line". So, basically, what
happens is: the first sequence goes to buffer, "cr" returns insertion point
at the begining and overwrites the line, second sequence gets inserted and
then "nl" gets to a new line. "more" seams to ignore "cr".


Original Question


	> Can anyone explain this phenomenon please.
	> 
	> When I "more " a certain file I get thus .....
	> 
	> root@titan:/#more <mailto:root@titan:/#more>
fp_ariel_colour_file2.dat
	> 10000292|PG7470|117580966|10000292|
	> 10000749|PG7470|117581503|10000749|
	> 10000952|PG7470|117581732|10000952|
	> 10001012|PG7470|117581796|10001012|
	> 10001330|PG7470|117582160|10001330|
	> 10001487|PG7470|117582368|10001487|
	> 10001765|PG7470|117582700|10001765|
	> 10002152|PG7470|117583170|10002152|
	> 10002210|PG7470|117583240|10002210|
	> 10002354|PG7470|117583397|10002354|
	> 10003221|PG7470|11758445|10003221|
	> 10003749|PG7470|117585063|10003749|
	> 10003986|PG7470|117585356|10003986|
	> 10004227|PG7470|11758566|10004227|
	> 10004314|PG7470|11758576|10004314|
	> 10004774|PG7470|11758634|10004774|
	> 100049|PG7470|10246108|100049|
	> 
	> When I " cat " a file and pipe it to head I get thus .....
	> 
	> root@titan:/#cat <mailto:root@titan:/#cat>
fp_ariel_colour_file2.dat|head
	> 117580966|10000292|
	> 117581503|10000749|
	> 117581732|10000952|
	> 117581796|10001012|
	> 117582160|10001330|
	> 117582368|10001487|
	> 117582700|10001765|
	> 117583170|10002152|
	> 117583240|10002210|
	> 117583397|10002354|
	> 
	> Here is the od output to help analyse
	> 
	> root@titan:/ <mailto:root@titan:/>  #od -a
fp_ariel_colour_file2.dat|more
	> 0000000    1   0   0   0   0   2   9   2   |   P   G   7   4   7
0   |
	> 0000020   cr   1   1   7   5   8   0   9   6   6   |   1   0   0
0   0
	> 0000040    2   9   2   |  nl   1   0   0   0   0   7   4   9   |
P   G
	> 0000060    7   4   7   0   |  cr   1   1   7   5   8   1   5   0
3   |
	> 0000100    1   0   0   0   0   7   4   9   |  nl   1   0   0   0
0   9
	> 0000120    5   2   |   P   G   7   4   7   0   |  cr   1   1   7
5   8
	> 0000140    1   7   3   2   |   1   0   0   0   0   9   5   2   |
nl   1
	> 0000160    0   0   0   1   0   1   2   |   P   G   7   4   7   0
|  cr
	> 0000200    1   1   7   5   8   1   7   9   6   |   1   0   0   0
1   0
	> 0000220    1   2   |  nl   1   0   0   0   1   3   3   0   |   P
G   7
	> 0000240    4   7   0   |  cr   1   1   7   5   8   2   1   6   0
|   1
	> 0000260    0   0   0   1   3   3   0   |  nl   1   0   0   0   1
4   8
	> 0000300    7   |   P   G   7   4   7   0   |  cr   1   1   7   5
8   2
	> 0000320    3   6   8   |   1   0   0   0   1   4   8   7   |  nl
1   0
	> 0000340    0   0   1   7   6   5   |   P   G   7   4   7   0   |
cr   1


Bill Boddy

                 reply	other threads:[~2000-01-28  9:12 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox