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.
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.
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...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.