Skip to content
Home » AIX » How to Resolve ksh: declare: not found

How to Resolve ksh: declare: not found

declare: not found

Saw error declare: not found when we tried to make the modified profile come into effect in AIX.

$ . ~/.profile
ksh: declare: not found

We thought declare and typeset are synonym commands, but it's only sustained in Linux or Bash shell environment.

Let's see what it says.

The declare or typeset builtins, which are exact synonyms, permit modifying the properties of variables. This is a very weak form of the typing [1] available in certain programming languages. The declare command is specific to version 2 or later of Bash. The typeset command also works in ksh scripts.

In AIX, a ksh environment, there's no declare command, we should use typeset.

Leave a Reply

Your email address will not be published. Required fields are marked *