Wednesday, March 31, 2021

OEM 13.4 failed with '0403-011 The specified substitution is not valid for this command'

When using Oracle Enterprise Manager 13.4 to deploy Agent 13.4 on AIX server, got following error,
./[270]: platform=${platform/\)/%29}: 0403-011 The specified substitution is not valid for this command.

Line 270 in is

It is a bash statement which tries to replace right parenthesis with code '%29', it works for bash but not Bourne shell (sh). The problem is that the script has directive to have Unix/Linux to run the script under bourne shell
$ head
# $Header: emcore/install/unix/ /main/30 2019/12/19 21:29:10 vbhaagav Exp $
# Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
#    NAME
# - <one-line expansion of the name>

The script works on most Linux servers because the /bin/sh is a symbolic link file linked to /bin/bash on these servers. Unfortunately, AIX is honest :), sh is sh and bash is bash, they are different.

As workaround, replace first line of '#!/bin/sh' with '#!/bin/bash'.

No comments: