Project and Portfolio Management Practitioners Forum
cancel
Showing results for 
Search instead for 
Did you mean: 

$'\r': command not found

Highlighted
ybarry
Occasional Advisor

$'\r': command not found



I installed PPM 7.5, Java Sdk 5.0 - E:\java\jdk1.5.0_22, cygwin. All those applications were install using Administrator user.
I created the following variables:

CYGWIN value=tty
JAVA_HOME value = E:\java\jdk1.5.0_22
ORACLE_HOME value = C:\oracle\v102030

PATH =
C:\oracle\v102030\bin;C:\Program Files\Windows Resource Kits\Tools\;C:\Program Files\Support Tools\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\system32\WindowsPowerShell\v1.0;C:\Program Files\Windows Imaging\;C:\cygwin\bin;E:\java\jdk1.5.0_22\bin


I’m tried to install SP4 but I had the following error


$ sh ./kDeploy.sh -i SP4
./kDeploy.sh: line 2: $'\r': command not found
./kDeploy.sh: line 9: $'\r': command not found
./kDeploy.sh: line 13: $'\r': command not found
./kDeploy.sh: line 16: $'\r': command not found
./kDeploy.sh: line 21: $'\r': command not found
./kDeploy.sh: line 25: $'\r': command not found
./kDeploy.sh: line 45: syntax error near unexpected token `$'{\r''
'/kDeploy.sh: line 45: `necho() {
So I use dos2unix

$ dos2unix kDeploy.sh
kDeploy.sh: done.

$ sh ./kDeploy.sh -i SP4
./kVariables.sh: line 34: $'\r': command not found
./kVariables.sh: line 36: $'\r': command not found
./kVariables.sh: line 40: $'\r': command not found
./kVariables.sh: line 69: syntax error near unexpected token `$'{\r''
'/kVariables.sh: line 69: `get_valid_server_directory() {
./SQLMinus.sh: line 6: $'\r': command not found
./SQLMinus.sh: line 9: $'\r': command not found
./SQLMinus.sh: line 13: $'\r': command not found
./SQLMinus.sh: line 16: $'\r': command not found
./SQLMinus.sh: line 19: $'\r': command not found
./SQLMinus.sh: line 25: syntax error near unexpected token `$'{\r''
'/SQLMinus.sh: line 25: `sqlmGetVariable() {
./kDeploy.sh: line 1524: sqlmGetPassword: command not found
java.lang.NoClassDefFoundError: com/kintana/cmgmt/deploy/RunDeployQuery
Exception in thread "main" ERROR: Could not determine the version of the HP PPM
server!
Patch cannot be applied.

Do you have any idea how to fix this mess?
3 REPLIES
Sascha Mohr
Esteemed Contributor

Re: $'\r': command not found

Hi, never seen this before. In which folder are you running the shell script?
RichardWoodmans
Occasional Contributor

Re: $'\r': command not found

My guess is that you installed PPM on a Windows server using Cygwin 1.7. Cyginw 7.1 does not prompt you to use Windows files that contain CR/LF.

Try adding a new Windows environment variable "SHELLOPTS=igncr".
Bobby M
Super Collector

Re: $'\r': command not found

Hi,

Try using 'ash' instead of sh

$ ash ./kDeploy.sh -i SP4

Regards
Bobby
//Add this to "OnDomLoad" event