External Email - Use Caution
I would check both csh and tcsh are installed with,
$ which csh/bin/csh
$ which tcsh/usr/bin/tcsh
If not installed then do, e.g., for tcsh,$ sudo apt-get install tcsh
- subsequently the “which” command above should return the path to where it is on the system (if it was not installed).
With the shells installed, you can also try running the script directly as an argument to a given shell, e.g.
$ bash script <arguments>
$ csh script <arguments>
$ tcsh script <arguments>
- R.
On May 20, 2020, at 06:12, Fleur Warton <fleur.warton(a)gmail.com> wrote: External Email - Use Caution Hi,Thanks for the reply! The output for 'file' was tcsh. I switched to tcsh (just in that session) but got the same error when running infant_recon_all if: Expression SyntaxKind regards,-- Fleur Warton Postdoctoral Research FellowDivision of Biomedical EngineeringFaculty of Health SciencesUniversity of Cape TownOn Wed, May 20, 2020 at 11:42 AM fsbuild <fsbuild(a)contbay.com> wrote:Hello Fleur,You should be able to do,$ file `which infant_recon_all`... and the output should tell you if it it is a csh script, a Bourne shell script, a binary, etc.Unless you explicitly made csh or bash your default shell, then at the dollar sign prompt the default shell in Ubuntu is "dash" and not bash or Bourne shell. If the file command reports it's a Bourne shell then it might be a bash script. Or a bash script with a hash bang line of /bin/sh will run using dash shell on Ubuntu and can exit with that error on bash syntax/grammar. You can eliminate that possibility by first running bash, and then the script,$ bash$ infant_recon_all --s SUBJ --age AGE(with I presume arguments substituted for SUBJ and AGE)- R.Fleur Warton May 20, 2020 at 04:05 External Email - Use Caution Hi,I recently installed the Infant FreeSurfer package. When I try to run infant_recon_all (specific command: infant_recon_all --s SUBJ --age AGE) I get the error if: Expression SyntaxI tried switching shells from bash to tcsh but got the same error.The FreeSurfer version is freesurfer-infant-20200205My platform is Ubuntu 18.04Any suggestions how to fix this?Kind regards,Fleur _______________________________________________Freesurfer mailing listFreesurfer@nmr.mgh.harvard.eduhttps://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer_______________________________________________Freesurfer mailing listFreesurfer@nmr.mgh.harvard.eduhttps://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer