1846622 Members
1972 Online
110256 Solutions
New Discussion

HP UX 11.11/800

 
SOLVED
Go to solution
Mark Wheadon
Advisor

HP UX 11.11/800

I am trying to use CPM_collect to see what are the latest patches that are required.

I am getting an error of

CPM_Collect.sh[101]: Synatax error at line 197 : 'Elif' is not expected.

I am running as root
10 REPLIES 10
G. Vrijhoeven
Honored Contributor

Re: HP UX 11.11/800

Hi,

This could be related to a single qoute, or if, then else etc. loop.

HTH,

Gideon
Mark Wheadon
Advisor

Re: HP UX 11.11/800

Thanks :) but any ideas how i resolve it.
Eric Antunes
Honored Contributor

Re: HP UX 11.11/800

Have you changed the original cpm_collect.sh script? You can compare it with this one...
Each and every day is a good day to learn.
G. Vrijhoeven
Honored Contributor

Re: HP UX 11.11/800

Hi,

Open the script and do a search for all qoutes to see if they are ended.

HTH,

Gideon
Mark Wheadon
Advisor

Re: HP UX 11.11/800

This is the error message that I have recieved. Still no luck getting it working (its the orginial file that I downloaded from HP).

# sh cpm_collect.sh
cpm_collect.sh[87]: ^M: not found.
cpm_collect.sh[93]: ^M: not found.

Warning! One or more of your selected locales are not available.
Please invoke the commands "locale" and "locale -a" to verify your
selections and the available locales.

Continuing processing using the "C" locale.

cpm_collect.sh[101]: Syntax error at line 197 : `elif' is not expected.
Olivier Decorse
Respected Contributor

Re: HP UX 11.11/800

Hi,

^M: not found is usally a problem, coming from file tranfert : if you receive this file in a windows box, put it to your unix server, with binary mode, with ftp, like this :
ftp
bin
put cpm_collect.sh
bye

Also, just run it adding execution right with :
chmod +x cpm_collect.sh
and run it with :
./cpm_collect.sh

Olivier.

PS : Don't forget to assing points : it is important for us to known if any response help you, or not. And you will have more chance to receive help.
They say "install windows 2k, xp or better", so i install unix !
Eric Antunes
Honored Contributor

Re: HP UX 11.11/800

Hi Olivier,

I think you wanted to say to him to use ASCII and not BINARY: that's because of using BIN that he gets those errors...
Each and every day is a good day to learn.
Dave Unverhau_1
Honored Contributor
Solution

Re: HP UX 11.11/800

Actually, I have also found that I more often see this kind of file corruption when I do the ftp in ASCII mode. Usually, binary mode works great!

Mark, you might want to try the following:

# mv CPM_collect.sh old_CPM_collect.sh
# dos2ux old_CPM_collect.sh > CPM_collect.sh

the dos2ux utility should strip off the extraneous ^m (carraige return) characters. This has worked for me in the past with other shell scripts that got modified by the PC-UX interchange.

Best Regards,

Dave
Romans 8:28
Mark Wheadon
Advisor

Re: HP UX 11.11/800

Guys,

Thanks for your support.

I ran the dos2ux command and also chmod +x and it worked a treat :o). Now time to patch it !!!!
Eric Antunes
Honored Contributor

Re: HP UX 11.11/800

Dave,

I just use this dos2ux on text files because, you transfer them in binary mode. I have never needed this utility, except from files I've received on CD from other people...
Each and every day is a good day to learn.