Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Set display column in Unix

Status
Not open for further replies.

yerra

IS-IT--Management
Jan 6, 2005
11
FR
I am using Dec Alpha v5.1 and I have a program that sets a variable value of which goes above 80 characters. So after 80 char, it puts a space/newline and hence I am not able to capture the entire value of the variable.

Any Idea on how to go bout this ?
 
Are you using dtterm?
If so, you may click 'Options',
and then change WindowSize or FontSize.
hope this helps
 
No Actually I am using a telnet session to my server. In my terminfo file I have a setting for setting the col length to 132 i.e setting TERM to vt100 -w (which means set it to wide). Still it chops of the variable at 80th character , inserts a space and then continues with the variable.
 
which telnet client?
which system do you come from (Windows, Unix) ?
 
I am using a windows telnet client. I also tried using putty (which is another telnet client) on my windows system. Still shows the same symptom..
 
You could try setting the shell built-in variable COLUMNS, e.g: export COLUMNS=132
However, the problem might be caused by a limitation of the program you are using. If you are using sqlplus you would need to set linesize=132, for example.
 
Is the problem that you can't see the output, or just that you can't copy/paste the output in the form you want it?

If you can't see it at all, and it has spaces in it, you might try piping the output to [tt]fmt[/tt]. That is,
Code:
$ command | fmt

If it doesn't have spaces, [tt]fmt[/tt] won't work, since it only breaks lines at spaces. However, [tt]fold[/tt] will ignore spaces and make sure output lines fit within a given width. E.g.
Code:
$ command |fold -w 75
It's ugly, but it may be the best you can do.


If the problem is that copying the value gives you newlines and you don't want that, then your terminal program might just suck. You could try pasting into an editor and deleting all the newlines... good luck searching for a newline in Notepad, though...
 
Hi,

putty works for me.
I connect to a Tru64 V5.1B;
Unix command 'stty -a' shows that linesize changes whenever I resize my putty window.

Good news is:
There must be a way for you as well.

Bad news is:
I haven't any clue (at least for this moment) which setting you should change.

regards
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top