While using the "Run Command Line" action to run a shell script it is returning:
Run Command Line action has failed.
Return value: ...
Std err: /path/to/shellscript.sh ... line <#>: syntax error: unexpected end of file
CA Release Automation 5.5.2 Server
CA Release Automation Agent on Unix/Linux
The shell script was saved on Windows and copied to the Unix/Linux agent machine. The problem with this is that Windows uses CR LF (carriage return & line feed) to handle new lines while Unix/Linux uses LF. This can usually be seen by using the command:
cat -vet /path/to/shellscript.sh
and observing the ^M characters at the end of each line.
Remove the carriage return characters from the shell script (using dos2unix or some other tool) before using the "Run Command Line" action.