Re: How to do this

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On 10/24/10 11:20, Johannes Held wrote:
Christian<christian08@xxxxxxxxxx>:
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.



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux