[arch-general] 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
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
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
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`.
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!
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"
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".
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
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.
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
participants (7)
-
Baho Utot
-
Christian
-
Heiko Baums
-
jesse jaara
-
Johannes Held
-
Lukas Fleischer
-
Matthew Monaco