How can you get a text file of 3dDespike on-screen outputs?

HI folks,

I’m interested in saving a txt file of the “…XXXX big edits” spam that appears on screen as 3dDespike works on a dataset.

Adding “>> Despikelog” to the 3dDespike command line resulted in an empty text file.

What should I add to the script or command line to save a text chronicle of the extent of the edits/interpolations?



Hi Jim,

If “>>” does not work, then the messages are
probably going to stderr (instead of stdout).

Are you running bash or tcsh? Assuming tcsh,
use “>>&”, instead.

  • rick

Thanks Rick! That solved it. Kinda weird having the screen go in limbo with no on-screen messages while AFNI works, but I got the text file I wanted for posterity anyway. -J


you can add ‘&’ to the end of your command to run it in the background, allowing you to continue working in the terminal while the despiking is done:

3dDespike run1+orig >>& despike.out &

hope this helps.


Rather than that, you might just let the text output
go to the screen as well as the file:

3dDespike run1+orig |& tee -a despike.out

That is tcsh syntax though. If you are using bash:

3dDespike run1+orig 2>&1 | tee -a despike.out

  • rick