batch mode for ctffind4

Hi,
I'd like to estimate defocus value for a serial images. how to use the batch mode for ctffind4

1st I tried this:

echo mrc/input.mrc output_diag.mrc 1.0 300 2.7 0.07 512 30 5 5000 50000 500 100 no | ctffind

and ctffind4 considers 'mrc/input.mrc output_diag.mrc 1.0 300 2.7 0.07 512 30 5 5000 50000 500 100 no' as a input file...

so it is not necessary to put this command in a loop

2nd I tried:

-------
It's OK now. I find a way.