Hi,

It is possible that it isn't covered there, although I thought it was.
Anyway, the principle is that the star is a placeholder of a string (name) of any length.
So, for example, let's say that the following files existing in your directory:

myparams.txt struct.nii.gz vol0000.nii.gz vol0001.nii.gz vol0002.nii.gz vol0003.nii.gz

If you then typed:
  ls vol*
it would become:
  ls vol0000.nii.gz vol0001.nii.gz vol0002.nii.gz vol0003.nii.gz
Since the shell (terminal) will replace vol* with things starting with "vol" but ending with anything.

If you had instead done:
   ls *.nii.gz
then if would become:
   ls struct.nii.gz vol0000.nii.gz vol0001.nii.gz vol0002.nii.gz vol0003.nii.gz
as it would match names starting with anything but ending with ".nii.gz"

You can also have more than one, so that:
   ls vol*2*.gz
would become
   ls vol0002.nii.gz

Each star represents any sequence of letters and can be different from the other stars.

Also note that "ls" here is not special in any way.  This would occur for any command that you typed into a terminal.

I hope this helps.

All the best,
Mark



On 27 Jun 2018, at 17:52, Hashmat, Shahmeer A <[log in to unmask]> wrote:

I actually went through all those tutorials, but that is one of a few things I did not understand. I'l do some more digging, though.

Thank you!

From: FSL - FMRIB's Software Library <[log in to unmask]> on behalf of Mark Jenkinson <[log in to unmask]>
Sent: Wednesday, June 27, 2018 4:00:24 AM
To: [log in to unmask]
Subject: Re: [FSL] "vol *" usage in FSL?
 
Hi,

I am currently going through some tutorials provided by FSL, specifically the FSLUtils tutorial. I am working through a section that involves fslsplit/fslmerge, and I am confused on something the tutorial states. Here is an image on what the text says:

https://imgur.com/a/jESfu72

(I know the image is small, but if you zoom in, it should look okay).

Basically, I am confused on the part that states "(note that the * is expanded by the terminal to fit any characters in all possible filenames present, and so can be used in any commands, not just ls, as we will see below)." I am honestly very confused as to what this is trying to say. Any clarity would be fantastic!

This is something that is standard when using the shell (terminal) in unix (or linux or mac).  If you have not come across this type of wildmasking then I strongly recommend that you go through the Unix section of our preparatory materials (see http://fsl.fmrib.ox.ac.uk/fslcourse/ ).

You should also find the introductory lecture helpful and would also benefit from the introductory textbook that we've written, aimed at people new the field and those who are taking the FSL Course: http://www.neuroimagingprimers.org/

All the best,
Mark



Thanks

########################################################################

To unsubscribe from the FSL list, click the following link:
https://www.jiscmail.ac.uk/cgi-bin/webadmin?SUBED1=FSL&A=1



To unsubscribe from the FSL list, click the following link:
https://www.jiscmail.ac.uk/cgi-bin/webadmin?SUBED1=FSL&A=1


To unsubscribe from the FSL list, click the following link:
https://www.jiscmail.ac.uk/cgi-bin/webadmin?SUBED1=FSL&A=1



To unsubscribe from the FSL list, click the following link:
https://www.jiscmail.ac.uk/cgi-bin/webadmin?SUBED1=FSL&A=1