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
10-24-2010, 02:36 PM
jesse jaara
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
10-24-2010, 02:36 PM
Lukas Fleischer
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".
10-24-2010, 02:38 PM
jesse jaara
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
10-24-2010, 02:45 PM
Lukas Fleischer
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`.
10-24-2010, 02:55 PM
Christian
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!
10-24-2010, 03:20 PM
Johannes Held
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
10-24-2010, 03:24 PM
Heiko Baums
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
10-24-2010, 03:34 PM
Baho Utot
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.
10-24-2010, 05:16 PM
Matthew Monaco
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`.