Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 603
  • Last Modified:

problem ! is not accepted in HP-UX machine

Hi guys i am facing this problem..and it work for Sun box...do you have any idea??

what to do..

test.ksh
if ! "$PVT_OPT_S" || ! "$PVT_OPT_G"
if ! [[ -d "$PVT_SRCLOC" ]]

output:

/tmp/test.ksh[253]: !:  not found
/tmp/test.ksh[325]: !:  not found
0
parlepoint
Asked:
parlepoint
1 Solution
 
omarfaridCommented:
Hi,

Are you sure that you are not running it as a csh / tcsh?

0
 
parlepointAuthor Commented:
i am sure running as ksh
0
 
omarfaridCommented:
Hi,

If you run from the command line

$ ksh
$ if ! [[ -f /etc ]]
then
echo not file
fi

What do you get? Is the same error?
0
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
parlepointAuthor Commented:
not same error
$ if ! [[ -f /etc ]]
> then
> echo hello
> fi
ksh: !:  not found
0
 
TintinCommented:
Solaris and HP-UX have different ksh versions.

The normal way of writing the test is:

if  [[ ! -d "$PVT_SRCLOC" ]]

if  [[ -n "$PVT_OPT_S" -o  -n  "$PVT_OPT_G" ]]
0
 
ahoffmannCommented:
which ksh version are you using?
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now