Operating System - HP-UX
1834460 Members
2960 Online
110067 Solutions
New Discussion

Syntax error when running cpm_collect.sh

 
SOLVED
Go to solution
Simon Qu
Frequent Advisor

Syntax error when running cpm_collect.sh

I downloaded cpm_collect.sh (A.03.14) and FTPed to hp-ux. When I ran it, I got error message:

Creating list of patches in ./dr12w.fs...
syntax error The source line is 15.
The error context is
{if ($2 >>> ~~ <<< /[0-9]+/)
awk: The statement cannot be correctly parsed.
The source line is 15.
syntax error The source line is 53.

Creating list of patch aggregates in ./dr12w.fs...
syntax error The source line is 3.
The error context is
{if ($1 >>> !~~ <<<
awk: The statement cannot be correctly parsed.
The source line is 3.
awk: There is a missing ) character.

Creating list of products and filesets in ./dr12w.fs...
syntax error The source line is 26.
The error context is
{if ((start) && (product) && (product >>> !~~ <<< /PH.._[0-9]*/))
awk: The statement cannot be correctly parsed.
The source line is 26.
syntax error The source line is 42.
syntax error The source line is 5.
The error context is
{if ($1 >>> ~~ <<<
awk: The statement cannot be correctly parsed.
The source line is 5.
awk: The statement cannot be correctly parsed.
The source line is 7.


Any help will be much appreciated.
3 REPLIES 3
Kent Ostby
Honored Contributor
Solution

Re: Syntax error when running cpm_collect.sh

I would think that that should be !~ instead of !~~ . That's without looking at the script though.
"Well, actually, she is a rocket scientist" -- Steve Martin in "Roxanne"
Kent Ostby
Honored Contributor

Re: Syntax error when running cpm_collect.sh

Just to follow up, the man page for awk lists :

~
and
!~

but not
!~~

for operators.
"Well, actually, she is a rocket scientist" -- Steve Martin in "Roxanne"
Simon Qu
Frequent Advisor

Re: Syntax error when running cpm_collect.sh

Thanks. It worked.