PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Forums Hébergement > Forum Serveur - Sécurité et techniques > comp.unix.shell > (screen) problem with terminal wraparound
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
comp.unix.shell Using and programming the Unix shell.

(screen) problem with terminal wraparound

Réponse
 
LinkBack Outils de la discussion
Vieux 26/12/2007, 00h32   #1
Kenny McCormack
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut (screen) problem with terminal wraparound

Running "GNU screen", I have a little problem with "cat". I have a file
with one very long line, and when I 'cat' the file in a terminal window
in screen (the terminal window is 80x25 - as shown in "stty -a"), it
truncates the characters between positions 81 and 145. I.e., the
display is like this:
123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-
X...

where X is the 146th char of the line, and ... is the remainder of the
line after char 146.

If I use something like 'less' to display the file, it comes up
correctly. I.e., I think 'less' honors the "stty" settings, but somehow
'cat' does not.

Further, if you test with this command line:

gawk 'BEGIN {for (i=1; i<30; i++) printf("%10d",i)rint ""}'

you get this output:

1 2 3 4 5 6 7 9

(weird that the last character on the line is "9", not "8").
If you pipe the above gawk command line into 'less' then everything is
fine.

Anyway, I'm pretty sure all of my 'stty' settings of 'rows' and
'columns' are correct, in all of the involved ttys. I think something
in screen got screwed up. This is a very long-running instance of
'screen', that I would rather not re-start, so I'd prefer to be able
to fix it.

I know that screen has zillions of internal parameters that can be
messed with (and, thus, messed up). Can anyone suggest something that
may be the cause of this?

  Réponse avec citation
Vieux 27/12/2007, 03h34   #2
Dave Kelly
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: (screen) problem with terminal wraparound

On Dec 25, 6:32 pm, gaze...@xmission.xmission.com (Kenny McCormack)
wrote:
> Running "GNU screen", I have a little problem with "cat". I have a file
> with one very long line, and when I 'cat' the file in a terminal window
> in screen (the terminal window is 80x25 - as shown in "stty -a"), it
> truncates the characters between positions 81 and 145. I.e., the
> display is like this:
> 123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-
> X...
>
> where X is the 146th char of the line, and ... is the remainder of the
> line after char 146.
>
> If I use something like 'less' to display the file, it comes up
> correctly. I.e., I think 'less' honors the "stty" settings, but somehow
> 'cat' does not.
>
> Further, if you test with this command line:
>
> gawk 'BEGIN {for (i=1; i<30; i++) printf("%10d",i)rint ""}'
>
> you get this output:
>
> 1 2 3 4 5 6 7 9
>
> (weird that the last character on the line is "9", not "8").
> If you pipe the above gawk command line into 'less' then everything is
> fine.
>
> Anyway, I'm pretty sure all of my 'stty' settings of 'rows' and
> 'columns' are correct, in all of the involved ttys. I think something
> in screen got screwed up. This is a very long-running instance of
> 'screen', that I would rather not re-start, so I'd prefer to be able
> to fix it.
>
> I know that screen has zillions of internal parameters that can be
> messed with (and, thus, messed up). Can anyone suggest something that
> may be the cause of this?


SilverNail:~# gawk 'BEGIN {for (i=1; i<30; i++) printf("%10d",i)rint
""}'
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 2425 26 27
28 29
SilverNail:~#
  Réponse avec citation
Vieux 02/01/2008, 11h49   #3
Stephane Chazelas
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: (screen) problem with terminal wraparound

On Wed, 26 Dec 2007 00:32:39 +0000 (UTC), Kenny McCormack wrote:
[...]
> gawk 'BEGIN {for (i=1; i<30; i++) printf("%10d",i)rint ""}'
>
> you get this output:
>
> 1 2 3 4 5 6 7 9
>
> (weird that the last character on the line is "9", not "8").

[...]

"9" might be the "9" of "29". Could be that you have "wrap" off.
Try <Ctrl-A>r.

--
Stephane
  Réponse avec citation
Vieux 03/01/2008, 11h57   #4
Kenny McCormack
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: (screen) problem with terminal wraparound

In article <477b7a65$0$897$ba4acef3@news.orange.fr>,
Stephane Chazelas <stephane_chazelas@yahoo.fr> wrote:
>On Wed, 26 Dec 2007 00:32:39 +0000 (UTC), Kenny McCormack wrote:
>[...]
>> gawk 'BEGIN {for (i=1; i<30; i++) printf("%10d",i)rint ""}'
>>
>> you get this output:
>>
>> 1 2 3 4 5 6 7

>9
>>
>> (weird that the last character on the line is "9", not "8").

>[...]
>
>"9" might be the "9" of "29". Could be that you have "wrap" off.
>Try <Ctrl-A>r.
>
>--
>Stephane


This is now sorted (as of a day or two after original post).

It turns out there were two things going on (in some, but not all, of
the windows). (Somehow) wrap got turned off. And (somehow) the window
size (as seen in the output of ^Ai) got set to 145. After fixing both
of these things, things are back to normal now. Note that fixing the
window size is *not* easy.

I think this all happened after I accidentally did ^AS, which splits the
window. I think that sets some things that are hard to un-do. In
general, I think the split window feature is a good idea in theory, but
not useful in practice. I've tried it a few times (often by accident),
but never was comfortable with it.

  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 13h31.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,11476 seconds with 12 queries