1833796 Members
4872 Online
110063 Solutions
New Discussion

unshar htm patch file

 
SOLVED
Go to solution
zsujith
Frequent Advisor

unshar htm patch file

Hi,
I have downloaded the patch PHSS_36088.html and and remove first few lines up to "----------" and done the following commands.
# ls
PHSS_36088.htm
# sh PHSS_36088.htm
PHSS_36088.htm[13]: ^M: not found.
PHSS_36088.htm[14]: LANG^M: This is not an identifier.
# dos2ux PHSS_36088.htm > PHSS_36088
# sh PHSS_36088
PHSS_36088[20]: Syntax error at line 20 : `&' is not expected.
#

I am getting the sysntax error in line 20.


Can any one help me to resolve this issue.
"The most wasted day is that in which we have not laughed."
7 REPLIES 7
Torsten.
Acclaimed Contributor
Solution

Re: unshar htm patch file

You did something wrong!

On the download page, select

+ Expand to view additional download options

select gzip or tar and download.

If you transfer it from a PC to the server with ftp, use binary mode.

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Dennis Handly
Acclaimed Contributor

Re: unshar htm patch file

>I have downloaded the patch PHSS_36088.html

Typically you should save it as PHSS_36088.
Then you unshar it with sh.
Also, besides PHSS_36088, you probably need a compiler patch and you might as well download both and automatically get that choice Torsten's mentions.
Deepak Kr
Respected Contributor

Re: unshar htm patch file

Hi,

Patch file is not downloaded in proper format here.

On download page use FTP button at bottom of the screen and disable any download accelerator if any e.g. DAP etc

You will get windows download file window and then save that file without any extension.

As said earlier, use bin to transfer to hp box from pc...

Regds...Deepak
"There is always some scope for improvement"
James R. Ferguson
Acclaimed Contributor

Re: unshar htm patch file

Hi:

This happens when yuo download an individual patch to a Windows PC using HTML.

You need to FTP it from you Windows PC to your Unix server in ASCII mode to eliminate the carriage-return characters (^M). Your use of 'dos2ux' will also fix that after the fact.

The second problem is that the HTML encoded symbols like '>', '<' and '&'. A Perl snippet will fix that:

# perl -MHTML::Entities -pi -e 'decode_entities($_)' ./PHSS_36088

Regards!

...JRF...
Rohit Tole
New Member

Re: unshar htm patch file

Hi,

It seems like there are hidden "^M" characters in the PHSS_36088.htm file.
Use the following procedure to remove the "^M" characters
# tr -d '\015' < PHSS_36088.htm > PHSS_36088.htm.out
# sh PHSS_36088.htm.out
Let me know if this worked.

Cheers

Rohit
Deepak Kr
Respected Contributor

Re: unshar htm patch file

I believe if it is htm file then file should be downloaded again!!

"There is always some scope for improvement"
zsujith
Frequent Advisor

Re: unshar htm patch file

Thank U
"The most wasted day is that in which we have not laughed."