Hi,
Actually, this will overwrite the data in the file each time
which may or may not be what you want.
You can also use the ">>" operator to add to the end
of an existing file (it will also create the file if it doesn't exist).
That is:
fslstats $image -h 50 >> ${image}_hist.txt
Also note that you can use ">" and ">>" for any unix (linux)
commands.
All the best,
Mark
On 5 Jan 2011, at 20:04, Paul Guillod wrote:
> If I understand the question right:
>
> for image in `imglob *your_nii_files*` ; do
> fslstats $image -h (#bins) > ${image}_hist.txt
> done
>
> On Wed, Jan 5, 2011 at 2:42 PM, Uenal <[log in to unmask]> wrote:
> Thanks, Mark, now I am able to have the histogram values. But my question is actually: if I have lots of data for which I am creating histograms with a batch script automatically, how could I save these histogram outputs to individual .txt files within that batch analysis (other than copying and pasting into txt files one by one manually). I am sorry I was not clear enough...
> Thanks very much
> Uenal
>
|