I have a function called fslnvols which gives the number of images in a 4D image.
Usage:
fslnvols <input>
I wanted to save the output of the function to variable A,so I tried:
A=fslnvols inputimage
and
fslnvols inputimage
A=$(fslnvols)
but I didn't get the wanted result, any idea how to fix it?
var=$(foo)will store the stdout of thefoocommand in$var.