Some csh versions/forks seem to have problems with line breaks inside inline subshells - #2309@OpenFOAM-Foundation
Quoting myself from http://bugs.openfoam.org/view.php?id=2309
The issue I've stumbled upon with the "csh" package "20110502-2.1ubuntu1" in Ubuntu 16.04 (dpkg -l csh) is that a single backslash within the sub-shells using `` require double backslash and not a single backslash.
The problem is that I have not seen any similar report by anyone else, including on the OpenFOAM-plus issue tracker, and since Henry must have tested the script with success with a particular version or two, I'm really intrigued as to which csh versions/forks the current implementation in OpenFOAM 4.0 and newer works on.
Anyway, attached are two possible patches for extending compatibility, for easier inspection, on possible solutions:
- patch.v1 - uses double backslash inside `` sub-shells
- patch.v2 - uses removes backslash from inside `` sub-shells and makes the command a single line
The affected files are only these two:
Steps to reproduce:
# While on bash: $ cd ~/OpenFOAM/OpenFOAM-dev $ csh % source etc/cshrc Invalid null command. /OpenFOAM-dev/bin/foamEtcFile: Command not found. /OpenFOAM-dev/bin/foamCleanPath: Command not found. /OpenFOAM-dev/bin/foamCleanPath: Command not found. /OpenFOAM-dev/bin/foamCleanPath: Command not found. /OpenFOAM-dev/etc/config.csh/settings: No such file or directory.
Already tagged @Mattijs on that report. I don't know if anyone else here at OpenCFD uses