SAS Watchout - 19.1.0 - cheese - XMM-Newton
Whenever I run the task cheese, which is one of the ESAS tasks, I get the following error message:
/usr/bin/env: `perl/r`: No such file or directory.
However, I did install properly Perl following all the indications in the requirements page.
How to fix this problem?
The cheese Perl script included in SAS was released with lines terminated by the character "^M". That character is used in Windows files while lines in Linux and macOS text files terminate in a single line feed. That is the reason why the word "perl" in the first line of the cheese script appears as "perl\r". Thus, when the /usr/bin/env command finds such a strange suffix character "\r", it breaks the execution of the subsequent code.
To fix it, please execute the following command (valid on both Linux and macOS):
# cd $SAS_DIR/bin
# cp cheese cheese.bck
# tr '\r' '\n' < cheese.bck > cheese
# chmod 755 cheese