Say I open terminal and change directory to folder 'folder', I type
cd folder.
Say there're multiple folders within this folder, i.e. data 1, data 2, data 3, etc., and within each of those is an image named 'image_a'. Is there a way to source all of the 'image_a' files, and open them via command line? Or write a script/run a function that does?
This part may be irrelevant, but they're NIfTI gzip (.nii.gz) files that I'll open via FSLview. The syntax to open a single image is
fslview </file>
Best Answer
It depends on whether
fslview
accepts several filenames at once and does the right thing based on that (the documentation/man page should have more details on this). If yes, you can runto have it open all files at once. If no, you can use
or
instead (the second option works better if there are
data X
directories which don't containimage_a
).PS: For a test run, replace
fslview
withecho fslview
to see which command(s) would be executed.