Dear all
a new thread for a small question : how to properly redirect mrtrix output command ?
all command line have a nice output in a terminal (with an updated progress) but when I redirect the output to a file it put each progress to the output, which end up with big logfile not very easy to read (150M for a tckgen outpu) :
for instance
9676750 selectedtckgen: [ 96%] 452436141 generated, 9676753 selectedtckgen: [ 96%] 452436371 generated, 9676762 selectedtckgen: [ 96%] 452436491 generated, 9676764 selectedtckgen: [ 96%] 452436641 generated, 9676775 selectedtckgen: [ 96%] 452436831 generated, 9676783 selectedtckgen: [ 96%] 452437031 generated, 9676790 selectedtckgen: [ 96%] 452437201 generated, 9676796 selectedtckgen: [ 96%] 452437411 generated, 9676799 selectedtckgen: [ 96%] 452437561 generated, 9676806 selectedtckgen: [ 96%] 452437701 generated, 9676809 selectedtckgen: [ 96%] 452437871 generated, 9676815 selectedtckgen: [ 96%] 452438041 generated, 9676820 selectedtckgen: [ 96%] 452438181 generated, 9676823 selectedtckgen: [ 96%] 452438351 generated, 9676830 selectedtckgen: [ 96%] 452438511 generated, 9676837 selectedtckgen: [ 96%] 452438651 generated, 9676842 selectedtckgen: [ 96%] 452438771 generated, 9676845 selectedtckgen: [ 96%] 452438971 generated, 9676854 selectedtckgen: [ 96%] 452439161 generated, 9676860 selectedtckgen: [ 96%] 452439361 generated, 9676865 selectedtckgen: [ 96%] 452439531 generated, 9676873 selectedtckgen: [ 96%] 452439681 generated, 9676876 selectedtckgen: [ 96%] 452439841 generated, 9676878 selectedtckgen: [ 96%] 452440021 generated, 9676887 selectedtckgen: [ 96%] 452440191 generated, 9676891 selectedtckgen: [ 96%] 452440341 generated, 9676893 selectedtckgen: [ 96%] 452440501 generated, 9676899 selectedtckgen: [ 96%] 452440711 generated, 9676903 selectedtckgen: [ 96%] 452440891 generated, 9676907 selectedtckgen: [ 96%] 452441071 generated, 9676913 selectedtckgen: [ 96%] 452441191 generated, 9676917 selectedtckgen: [ 96%] 452441371 generated, 9676920 selectedtckgen: [ 96%] 452441521 generated, 9676925 selectedtckgen: [ 96%] 452441681 generated, 9676931 selectedtckgen: [ 96%] 452441821 generated, 9676938 selectedtckgen: [ 96%] 452441951 generated, 9676940 selectedtckgen: [ 96%] 452442101 generated, 9676945 selectedtckgen: [ 96%] 452442281 generated, 9676948 selectedtckgen: [ 96%] 452442451 generated, 9676952 selectedtckgen: [ 96%] 452442641 generated, 9676958 selectedtckgen: [ 96%] 452442811 generated, 9676964 selectedtckgen: [ 96%] 452442991 generated, 9676968 selectedtckgen: [ 96%] 452443191 generated, 9676979 selectedtckgen: [ 96%] 452443371 generated, 9676983 selectedtckgen: [ 96%] 452443511 generated, 9676986 selectedtckgen: [ 96%] 452443671 generated, 9676991 selectedtckgen: [ 96%] 452443801 generated, 9676994 selectedtckgen: [ 96%] 452443951 generated, 9676999 selectedtckgen: [ 96%] 452444111 generated, 9677001 selectedtckgen: [ 96%] 452444291 generated, 9677004 selectedtckgen: [ 96%] 452444441 generated, 9677006 selectedtckgen: [ 96%] 452444641 generated, 9677007 selectedtckgen: [ 96%] 452444791 generated, 9677010 selectedtckgen: [ 96%] 452444961 generated, 9677015 selectedtckgen: [ 96%] 452445151 generated, 9677023 selectedtckgen: [ 96%] 452445311 generated, 9677026 selectedtckgen: [ 96%] 452445481 generated, 9677029 selectedtckgen: [ 96%] 452445651 generated, 9677031 selectedtckgen: [ 96%] 452445771 generated, 9677036 selectedtckgen: [ 96%] 452445901 generated, 9677040 selectedtckgen: [ 96%] 452446101 generated, 9677045 selectedtckgen: [ 96%] 452446231 generated, 9677047 selectedtckgen: [ 96%] 452446421 generated, 9677049 selectedtckgen: [ 96%] 452446551 generated, 9677052 selectedtckgen: [ 96%] 452446731 generated, 9677056 selectedtckgen: [ 96%] 452446891 generated, 9677058 selectedtckgen: [ 96%] 452447041 generated, 9677061 selectedtckgenHere goes my lengthy text.
I am not sure if one can avoid it.
An other inconvenient is that every thing is going to the error file (and not the log file). So when running a lot of command through a cluster one can not easily see if an error occur (since all error file are full of log)
for instance if you have a mrtrix command in a bash script (job.sh) doing
bash job.sh > log.log 2> error.log
all the output come to the error.log file. It is not a big deal but if you know a way to avoid it , to have only error in the error.log ?
thanks
Romain