1752786 Members
6012 Online
108789 Solutions
New Discussion

how to set the terminal

 
SOLVED
Go to solution
jonesliu
Advisor

how to set the terminal

Hi:

I want to build the software(wxWight) in the HP UX 11.31, some errors occur.

But the error message is clearly mangled from the terminal, for unknown reasons.

 

I try to output the message to one document by the command "make >> output.txt", but the error message just is shown on the terminal and won't be written to the document.

 

I try the maximize the terminal , the  message will be more, but still  being truncated.

 

please refer to the compared image.

 

so, how can I get the entire error message via setting the terminal?

 

 

P.S. This thread has been moved from HP-UX-General to  languages. -HP Forum Moderator

 

 

18 REPLIES 18
SoumitraC
Frequent Advisor

Re: how to set the terminal

For redirecting error messages, you need to redirect 'stderr' to your log file.

                  make >> output.txt 2>error.txt

 

Or in case you want everything to go into the same log file,

                  make > output.txt 2>&1

 

Soumitra C
HP-UX Compilers
Bill Hassell
Honored Contributor

Re: how to set the terminal

>> so, how can I get the entire error message via setting the terminal?

 

Unless you can set the terminal line length to 500 or 1000, you'll never see the entire message on one line. And even if you could set the terminal width that large, you could not read it as the characters would only be a few pixels in size.

 

You can always pipe the output from make into cut -c 1-79 but then you'll lose the text at the end on the line. That will show each include on one line. When you redirect the output into a file, the lines will be still be very long. If you edit the file, your display problem will be the same as before.  You might print the file but rotate the text to landscape mode and reduce the font to get everything on one line (if you can read the small font).

 

To troubleshoot the make problem, the very long include lines may be useful as reference but the errors appear to be easitly readable. Using vi, you can edit the output file and search for selected text if necessary.



Bill Hassell, sysadmin
jonesliu
Advisor

Re: how to set the terminal

hi

Unless you can set the terminal line length to 500 or 1000, you'll never see the entire message on one line. And even if you could set the terminal width that large, you could not read it as the characters would only be a few pixels in size.

 

>> I can't find where to set the line length , I try to set the font to 6,5 point, but the error message still being  truncated.

can you kindly tell me how to set the terminal line length to 1000?

 

You can always pipe the output from make into cut -c 1-79 but then you'll lose the text at the end on the line.

>> sorry, I am stranger to Unix OS. can you describe more in detailed about  how to make into cut-c1-79?

     E.g:

      cut -c 79 output.txt

     I think the cut command is used to truncate the file to lower pieces  for readable easily. but first I should get the entire message then I can cut the output file to get more clearly fonts 

  

jonesliu
Advisor

Re: how to set the terminal

Hi Soumitra C

Thanks a lot, The error info can be written t to the file now, but the error message still be truncated

SoumitraC
Frequent Advisor

Re: how to set the terminal

Can you please post the contents of the file as an attachment, possibly gzipped?

 

Thanks!

Soumitra C
HP-UX Compilers
Bill Hassell
Honored Contributor

Re: how to set the terminal

>> I can't find where to set the line length , I try to set the font to 6,5 point, but the error message still being  truncated.

>> can you kindly tell me how to set the terminal line length to 1000?

 

You aren't using a typical terminal emulator, you're using Xwindows, probably xterm or dterm. To get 1000 characters across the screen, you need to change the font size about 2 or 3 points. But there is no font that small and even if you could find a font like that, you could not read it on a normal screen. 

 

In other words, you won't be able to see a 1-line message that is more than about 200 characters with xterm or dterm. However, when you redirect the messages into a fail, there is no practical line length limitation so everything is there. 

 

But it is really important to note that the messages are not truncated.

 

In your first attachment, the last long message starts with: /var/SPS/SPS/wxWidgets

and the end of that line reads:  ../src/common/wxcrt.cpp

 

So everything is there. The very long line is simply folded into 4 lines on your screen. No truncation has occurred.

 



Bill Hassell, sysadmin
Dennis Handly
Acclaimed Contributor

Re: how to set the terminal

>I can't find where to set the line length

 

I'm not sure what your problem is?  If you have long lines, the lines should be wrapped.  You just follow the lines to the logical beginning.  Your picture teminal-larger.png ‏73 KB looks fine.

 

If you don't like that wrapping, you could open the output in a browser as .txt, then you can scroll from left to right.

 

>but the error message still be truncated

 

Not truncated but wrapped.

jonesliu
Advisor

Re: how to set the terminal

The output will be correct when it is built successfully, but the errors  shown in terminal will be truncated when built fail.

 

please refer to the three pictures, the error info  shown in terminal will be different according to the  termimal windows size.

 

But, The error info will be the same if it is writen to the file whenever how to adjust the terminal window.

 

Bill Hassell
Honored Contributor

Re: how to set the terminal

The output.txt file shows that the each message is complete and not truncated. The long messages are folded onto the next several lines. Those extra lines are the original message. If you capture the last long line that starts with:

 

/var/SPS/SPS/wxWidgets...

 

and ends with:

 

../src/common/wxcrt.cpp

 

The line is 539 characters wide. It is one line and is not truncated. If you have to use Xwindows with HP-UX, you can use dtpad (the text editor from CDE) which should allow horizontal scrolling.

 

Or you can see the entire line by transferring the file to a PC and open it in Notepad. When you open the file, if you see the lines folded, then click on the Format menu item, and turn off Word Wrap. Now you will see a single line for each message plus a horizontal scroll bar at the bottom that you can slide to the right for the rest of the line.

 

 



Bill Hassell, sysadmin