Hi Moran
Mark has already answered this: you can append to a file with '>>'.
Applied to your example, you would enter
fslstats image1.nii -R -M -V > myfile.txt
fslstats image2.nii -R -M -V >> myfile.txt
fslstats image3.nii -R -M -V >> myfile.txt
When you use the single '>', myfile.txt will be emptied before the
fslstats output is written to it. When you use '>>', the existing
content is preserved and the new fslstats output is added at the end
(this is what "append" means).
I would strongly suggest you read some Linux introductory material
(try http://tldp.org/LDP/gs -- Chapter 3.9 deals with your question),
and visit a beginner's course. The FSL list is best suited for
questions pertaining specifically to FSL.
Rolf
On Sat, Jan 30, 2010 at 08:45:34AM +0000, Moran Artzi wrote:
>
> Hi,
> Sorry for asking again but- Can I save more then one line from the
> command line using ">"
> ie:
> fslstats image1.nii -R -M -V
> fslstats image2.nii -R -M -V
> fslstats image3.nii -R -M -V
> If so, how (using a short script)?
>
> Thanks
> Moran
> On Fri, Jan 29, 2010 at 9:52 AM, Mark Jenkinson
> <[1][log in to unmask]> wrote:
>
> Hi,
> In linux/unix/mac you can take the output of any
> command and put it into a text file using ">".
> That is:
> fslstats image1.nii -R -M -V > myfile.txt
> You can also append to a file with ">>".
> That is:
> fslstats image2.nii -R -M -V >> myfile.txt
> All the best,
> Mark
>
> On 29 Jan 2010, at 07:30, Moran Artzi wrote:
>
> Hi,
> Running scripts as:
> fslstats image1.nii -R -M -V
> fslstats image2.nii -R -M -V
> fslstats image3.nii -R -M -V
> How can I export (automatically) the fslstats results from the
> command line
> into txt file?
> Thanks
> Moran
>
> References
>
> 1. mailto:[log in to unmask]
--
Rolf A Heckemann, MD PhD
Médecin chercheur
Fondation Neurodis
CERMEP - Imagerie du Vivant
Hôpital Neurologique Pierre Wertheimer
59 Boulevard Pinel
69003 Lyon
France
1264846278
|