Re: Compile problems

R RENAUD <[email protected]>
Newsgroups gmane.user-groups.linux.ottawa.general
Message-ID <[email protected]>
--- On Tue, 10/26/10, Bart Trojanowski <[email protected]> wrote:

> > I wanted to see the first error that came out of make,
> > but it scrolls off the 
> > screen. Why does "make | more" not pause it for me?
> > "less" doesn't work either. 
> 
> Less will only read from stdin, and not stderr, where make
> and friends
> write out errors. You can run something like:
> 
>   make 2>&1 | less
> 
> The "2>&1" means:
>  "2" take stderr
>  ">&" pipe that to another file descriptor
>  "1" use stdin
> 
> "| less" will now read from stdin and get the errors from
> your build.

Bart's comments are correct.

Another way is the "script" command.
It's also useful for taking a note of interactive config files that
ask you questions.
    % script log.txt
    Script started, file is log.txt
    % make
    ...
    ^D
    % exit
    Script is done, file is log.txt
    % less log.txt

roland


-- 
OCLUG general discussion list
[email protected]
http://oclug.on.ca/mailman/listinfo/oclug
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.