1

As part of a txt file with instructions on how to run, I use a folder name as a parameter as shown below. However, LINUX does not recognize it. What could I be doing wrong?

foldername = "SOPHIE_TRANS"
matlab -nodesktop -nosplash -r "CellSort($foldername);quit"
2
  • add set -x before your matlab command to make sure your script or command is doing what you thing it's doing.
    – DopeGhoti
    Jun 8 '18 at 17:46
  • 5
    The code contains a typo (spaces around =).
    – Kusalananda
    Jun 8 '18 at 18:20
3

You are not setting a valid variable. You cannot have a space between the variable name, the equals, nor the variable value.

Try like this:

foldername="SOPHIE_TRANS"
matlab -nodesktop -nosplash -r "CellSort($foldername);quit"

Not the answer you're looking for? Browse other questions tagged or ask your own question.