FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor


 
 
LinkBack Thread Tools
 
Old 10-24-2010, 02:33 PM
Christian
 
Default How to do this

Hi all,
I know that I have to use piping for this, but I want to output the
errors I get while compiling a program into atext file.

What to type after make then?
Many thanks for any help,
Christian
 
Old 10-24-2010, 02:36 PM
jesse jaara
 
Default How to do this

If you build it in some terminal emulator you might be ableto save the whole
output into file. If i remember right atleast kdes konsole and yakuake can
do that
On 24.10.2010 17.33, "Christian" <christian08@runbox.com> wrote:
> Hi all,
> I know that I have to use piping for this, but I want to output the
> errors I get while compiling a program into atext file.
> What to type after make then?
> Many thanks for any help,
> Christian
 
Old 10-24-2010, 02:36 PM
Lukas Fleischer
 
Default How to do this

On Sun, Oct 24, 2010 at 04:33:10PM +0200, Christian wrote:
> I know that I have to use piping for this, but I want to output the
> errors I get while compiling a program into atext file.
> What to type after make then?

`make 2> foobar` will put them errors in a text file called "foobar".
 
Old 10-24-2010, 02:38 PM
jesse jaara
 
Default How to do this

I think i miss understoid you, if you wang the output og make to file you
can put >/file/path to end if iy
On 24.10.2010 17.36, "jesse jaara" <jesse.jaara@gmail.com> wrote:
> If you build it in some terminal emulator you might be ableto save the
whole
> output into file. If i remember right atleast kdes konsole and yakuake can
> do that
> On 24.10.2010 17.33, "Christian" <christian08@runbox.com> wrote:
>> Hi all,
>> I know that I have to use piping for this, but I want to output the
>> errors I get while compiling a program into atext file.
>> What to type after make then?
>> Many thanks for any help,
>> Christian
 
Old 10-24-2010, 02:45 PM
Lukas Fleischer
 
Default How to do this

On Sun, Oct 24, 2010 at 05:38:35PM +0300, jesse jaara wrote:
> I think i miss understoid you, if you wang the output og make to file you
> can put >/file/path to end if iy

">" won't work since errors are printed to stderr (not stdout) in most
cases. "2>" should do the trick. If there are some errors printed to
stdout, you could use `make 2>&1 >foo`.
 
Old 10-24-2010, 02:55 PM
Christian
 
Default How to do this

Hi,
On 2010-10-24 16:45, Lukas Fleischer wrote:

On Sun, Oct 24, 2010 at 05:38:35PM +0300, jesse jaara wrote:

I think i miss understoid you, if you wang the output og make to file you
can put>/file/path to end if iy

">" won't work since errors are printed to stderr (not stdout) in most
cases. "2>" should do the trick. If there are some errors printed to
stdout, you could use `make 2>&1>foo`.
Yes, that helped. Many thanks!
 
Old 10-24-2010, 03:20 PM
Johannes Held
 
Default How to do this

Christian <christian08@runbox.com>:
> I know that I have to use piping for this, but I want to output the
> errors I get while compiling a program into atext file.
> What to type after make then?
You could try "tee". man tee.

your_command | tee file_1 file_2


--
Gruß, Johannes
http://hehejo.de
 
Old 10-24-2010, 03:24 PM
Heiko Baums
 
Default How to do this

Am Sun, 24 Oct 2010 16:33:10 +0200
schrieb Christian <christian08@runbox.com>:

> Hi all,
> I know that I have to use piping for this, but I want to output the
> errors I get while compiling a program into atext file.
> What to type after make then?
> Many thanks for any help,
> Christian

The easiest way in Arch Linux is building a PKGBUILD, and putting it
to /var/abs/local/<packagename>.

Then cd to this directory and run `makepkg -L`.

Otherwise run `make > /path/to/logfile 2> /path/to/logfile`. You
probably need to replace > by >> and 2> by 2>>.

Heiko
 
Old 10-24-2010, 03:34 PM
Baho Utot
 
Default How to do this

On 10/24/10 11:20, Johannes Held wrote:

Christian<christian08@runbox.com>:

I know that I have to use piping for this, but I want to output the
errors I get while compiling a program into atext file.
What to type after make then?

You could try "tee". man tee.

your_command | tee file_1 file_2




If you need to bail from a calling makefile/bash script if an error
occurs do this:


LOG=<your_log_file>

( <your_command> | tee -a ${LOG} && exit $PIPESTATUS ) # append to a log
file


( <your_command> | tee ${LOG} && exit $PIPESTATUS ) # overwrite the log file

Then the calling makefile/bash script will bail on an error and not
continue.
 
Old 10-24-2010, 05:16 PM
Matthew Monaco
 
Default How to do this

On 10/24/2010 10:45 AM, Lukas Fleischer wrote:

On Sun, Oct 24, 2010 at 05:38:35PM +0300, jesse jaara wrote:

I think i miss understoid you, if you wang the output og make to file you
can put>/file/path to end if iy


">" won't work since errors are printed to stderr (not stdout) in most
cases. "2>" should do the trick. If there are some errors printed to
stdout, you could use `make 2>&1>foo`.



Or just "&> foo"
 

Thread Tools




All times are GMT. The time now is 01:49 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org