Hey Mitch,
the '\r' indicates that there are (Windows) <cr><lf> line endings in the script. I guess only QSHELL will handle those line terminators correctly while bourneshell, bash or ksh will insist on prober UNIX <LF> endings and will interpret the <cr> as a command.
Try running the scripts using qshell directly:
$ qsh /QIBM/ProdData/OS/WebServices/V1/client/bin/wsdl2ws.sh
This should work but might lead to other problems with character encoding and such when coming through SSH.
Converting the scripts with tools like dos2unix might also work, but I'd rather not change IBMs supplied scripts.
The safest way using these scripts IMO really is through QSH and greenscreen.
Hope this helps
Max
-----Original Message-----
From: OpenSource [mailto:opensource-bounces@xxxxxxxxxxxx] On Behalf Of Mitch Gallman
Sent: Mittwoch, 8. November 2017 18:26
To: opensource@xxxxxxxxxxxx
Subject: [IBMiOSS] SSH script $'\r': command not found
I am using git bash from Windows to SSH into our system and I am running some of the IBM scripts for IWS (wsdl2ws.sh) and getting errors:
/QIBM/ProdData/OS/WebServices/V1/client/bin/wsdl2ws.sh: line 15: $'\r': command not found
/QIBM/ProdData/OS/WebServices/V1/client/bin/wsdl2ws.sh: line 17: $'\r': command not found
/QIBM/ProdData/OS/WebServices/V1/client/bin/wsdl2ws.sh: line 19: $'\r': command not found
/QIBM/ProdData/OS/WebServices/V1/client/bin/wsdl2ws.sh: line 20: $'\r': command not found
': not a valid identifierices/V1/client/bin/wsdl2ws.sh: line 21: export: `JAVA_HOME
/QIBM/ProdData/OS/WebServices/V1/client/bin/wsdl2ws.sh: line 22: $'\r': command not found
/QIBM/ProdData/OS/WebServices/V1/client/bin/wsdl2ws.sh: line 24: $'\r': command not found
/QIBM/ProdData/OS/WebServices/V1/client/bin/wsdl2ws.sh: line 35: $'\r': command not found
/bin/java: No such file or directoryent/bin/wsdl2ws.sh: line 36: /QOpenSys/QIBM/ProdData/JavaVM/jdk70/32bit
/QIBM/ProdData/OS/WebServices/V1/client/bin/wsdl2ws.sh: line 37: $'\r': command not found
/QIBM/ProdData/OS/WebServices/V1/client/bin/wsdl2ws.sh: line 38: $'\r': command not found
Lines 15, 17, 19, 20, 22, 24, 35, 37 and 38 are all empty lines.
It seems to only happen on the IBM supplied scripts; scripts that I've developed are working fine.
Is there something I can do in my session so that these are interpreted correctly?
Mitch Gallman | U.S. Xpress, Inc.
IBM i Applications Developer
--
This is the IBMi Open Source Roundtable (OpenSource) mailing list To post a message email: OpenSource@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit:
https://lists.midrange.com/mailman/listinfo/opensource
or email: OpenSource-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at
https://archive.midrange.com/opensource.
As an Amazon Associate we earn from qualifying purchases.