For many purposes, you can also create one-time use datasets directly on the command line. For example,
3dmaskave -mask '3dcalc( -a mask9+orig -expr step(equals(a,7)+equals(a,8)) )' fred+orig
would create the mask from Rick's example in memory, and then use it, then throw it away (no file left on disk). This trick can be useful in scripts, once you understand what you are doing.
See the section "CALCULATED DATASETS" in the output of afni -help
[
afni.nimh.nih.gov]